调整前端代码格式符合ESLint规范
This commit is contained in:
+45
-46
@@ -44,54 +44,54 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {createLogger} from 'vuex';
|
||||
import MenuItem from "./MenuItem";
|
||||
import login from '../api/modules/login'
|
||||
import store from '../store'
|
||||
export default {
|
||||
name: "Menu",
|
||||
props: ["menuData", "path"],
|
||||
components: {
|
||||
MenuItem
|
||||
},
|
||||
methods: {
|
||||
handleRouter(item) {
|
||||
if(item.belong == 0){
|
||||
this.$store.commit('saveMenuName', item.label);
|
||||
if(this.$route.path == '/system/401Page'){
|
||||
import { createLogger } from 'vuex'
|
||||
import MenuItem from './MenuItem'
|
||||
import login from '../api/modules/login'
|
||||
import store from '../store'
|
||||
export default {
|
||||
name: 'Menu',
|
||||
props: ['menuData', 'path'],
|
||||
components: {
|
||||
MenuItem
|
||||
},
|
||||
methods: {
|
||||
handleRouter (item) {
|
||||
if (item.belong == 0) {
|
||||
this.$store.commit('saveMenuName', item.label)
|
||||
if (this.$route.path == '/system/401Page') {
|
||||
|
||||
}else{
|
||||
this.$router.push({name: '401Page', query: this.$route.query});
|
||||
}
|
||||
}else{
|
||||
this.$store.commit('savePathUrl', item.href);
|
||||
if (item.isUrl && Number(item.isUrl || 0)) {
|
||||
var param = this.$route.query
|
||||
// delete(this.$route.query.itemHref)
|
||||
|
||||
// param.itemHref = item.href
|
||||
if(this.$route.path == '/system/urlIndex'){
|
||||
this.$store.commit('saveMenuName', item.label);
|
||||
login.pageLog(this.$store.state.menuName).then(res => {
|
||||
}).catch(_ => {
|
||||
})
|
||||
}else{
|
||||
this.$store.commit('saveMenuName', item.label);
|
||||
this.$router.push({name: 'urlIndex', query: param});
|
||||
}
|
||||
} else {
|
||||
if (this.$route.path === item.href) return;
|
||||
// delete(this.$route.query.itemHref)
|
||||
this.$router.push({path: item.href, query: this.$route.query});
|
||||
}
|
||||
}
|
||||
},
|
||||
collageMenu(item) {
|
||||
item.isCollage = !item.isCollage;
|
||||
console.log(item.isCollage);
|
||||
}
|
||||
} else {
|
||||
this.$router.push({ name: '401Page', query: this.$route.query })
|
||||
}
|
||||
} else {
|
||||
this.$store.commit('savePathUrl', item.href)
|
||||
if (item.isUrl && Number(item.isUrl || 0)) {
|
||||
const param = this.$route.query
|
||||
// delete(this.$route.query.itemHref)
|
||||
|
||||
// param.itemHref = item.href
|
||||
if (this.$route.path == '/system/urlIndex') {
|
||||
this.$store.commit('saveMenuName', item.label)
|
||||
login.pageLog(this.$store.state.menuName).then(res => {
|
||||
}).catch(_ => {
|
||||
})
|
||||
} else {
|
||||
this.$store.commit('saveMenuName', item.label)
|
||||
this.$router.push({ name: 'urlIndex', query: param })
|
||||
}
|
||||
} else {
|
||||
if (this.$route.path === item.href) return
|
||||
// delete(this.$route.query.itemHref)
|
||||
this.$router.push({ path: item.href, query: this.$route.query })
|
||||
}
|
||||
}
|
||||
},
|
||||
collageMenu (item) {
|
||||
item.isCollage = !item.isCollage
|
||||
console.log(item.isCollage)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -175,7 +175,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.icon-level2 {
|
||||
display: inline-block;
|
||||
width: 3px;
|
||||
|
||||
Reference in New Issue
Block a user