Skip to content

Commit 8dd6fd3

Browse files
committed
eslint修复
1 parent 5a2b1b6 commit 8dd6fd3

File tree

1 file changed

+47
-45
lines changed

1 file changed

+47
-45
lines changed

src/components/layout.vue

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<div class="layout">
33
<el-container style="min-height: 100vh">
44
<el-header>
5-
<div width="200px" class="logo"></div>
5+
<div
6+
width="200px"
7+
class="logo"/>
68
</el-header>
79
<el-container>
810
<el-aside width="200px">
@@ -22,7 +24,7 @@
2224
<template v-if="item.sub">
2325
<el-submenu :index="item.key" :key="item.key">
2426
<template slot="title">
25-
<i class="el-icon-location"></i>
27+
<i class="el-icon-location"/>
2628
<span>{{ item.name }}</span>
2729
</template>
2830
<el-menu-item v-for="subItem in item.sub" :index="subItem.key" :key="subItem.key">
@@ -32,7 +34,7 @@
3234
</template>
3335
<template v-else>
3436
<el-menu-item :index="item.key" :key="item.key">
35-
<i class="el-icon-menu"></i>
37+
<i class="el-icon-menu"/>
3638
<span slot="title">{{ item.name }}</span>
3739
</el-menu-item>
3840
</template>
@@ -44,7 +46,7 @@
4446
</el-aside>
4547
<el-container>
4648
<el-main>
47-
<slot name="content"></slot>
49+
<slot name="content"/>
4850
</el-main>
4951
<el-footer>July Design ©2017 Created by July</el-footer>
5052
</el-container>
@@ -54,53 +56,53 @@
5456
</template>
5557

5658
<script>
57-
// import menus from 'localData/menulist.json';
58-
import Axios from 'util/axios';
59+
// import menus from 'localData/menulist.json';
60+
import Axios from 'util/axios';
5961
60-
const operateUrl = 'claa/menulist';
62+
const operateUrl = 'claa/menulist';
6163
62-
export default {
63-
name: 'layout',
64-
data() {
65-
return {
66-
defaultActive: 'item1',
67-
menuList: []
68-
};
69-
},
64+
export default {
65+
name: 'Layout',
66+
data() {
67+
return {
68+
defaultActive: 'item1',
69+
menuList: []
70+
};
71+
},
7072
71-
created() {
72-
this.defaultActive = this.$route.path.split('/')[1] ? this.$route.path.split('/')[1] : 'item1';
73-
},
74-
mounted() {
75-
this.doQuery();
76-
},
73+
created() {
74+
this.defaultActive = this.$route.path.split('/')[1] ? this.$route.path.split('/')[1] : 'item1';
75+
},
76+
mounted() {
77+
this.doQuery();
78+
},
7779
78-
computed: {
80+
computed: {
81+
},
82+
methods: {
83+
handleOpen(key, keyPath) {
84+
console.log(key, keyPath);
7985
},
80-
methods: {
81-
handleOpen(key, keyPath) {
82-
console.log(key, keyPath);
83-
},
84-
handleClose(key, keyPath) {
85-
console.log(key, keyPath);
86-
},
87-
doQuery() {
88-
const that = this;
89-
const param = {
90-
loadingFlag: true,
91-
url: operateUrl,
92-
method: 'POST',
93-
data: {
94-
type: 'on'
95-
},
96-
successFn(data) {
97-
that.menuList = data.list;
98-
}
99-
};
100-
Axios.fetch(param);
101-
}
86+
handleClose(key, keyPath) {
87+
console.log(key, keyPath);
88+
},
89+
doQuery() {
90+
const that = this;
91+
const param = {
92+
loadingFlag: true,
93+
url: operateUrl,
94+
method: 'POST',
95+
data: {
96+
type: 'on'
97+
},
98+
successFn(data) {
99+
that.menuList = data.list;
100+
}
101+
};
102+
Axios.fetch(param);
102103
}
103-
};
104+
}
105+
};
104106
</script>
105107

106108
<style lang="scss" scoped>

0 commit comments

Comments
 (0)