修改: 代码规范;

master
iczer 5 years ago
parent 19c48c7a30
commit 54e6a72f3a
  1. 2
      src/components/menu/menu.js
  2. 10
      src/components/setting/Setting.vue
  3. 12
      src/layouts/MenuView.vue
  4. 6
      src/layouts/PageView.vue
  5. 6
      src/layouts/RouteView.vue
  6. 6
      src/store/modules/setting.js

@ -19,7 +19,7 @@
* ]
**/
import Menu from 'ant-design-vue/es/menu'
import Icon from 'ant-design-vue/es/icon/'
import Icon from 'ant-design-vue/es/icon'
const {Item, SubMenu} = Menu

@ -57,7 +57,7 @@
</a-list-item>
<a-list-item>
多页签模式
<a-switch :checked="multipage" slot="actions" size="small" @change="setMultipage" />
<a-switch :checked="multiPage" slot="actions" size="small" @change="setMultiPage" />
</a-list-item>
</a-list>
</setting-item>
@ -79,8 +79,8 @@ export default {
name: 'Setting',
components: {ImgCheckboxGroup, ImgCheckbox, ColorCheckboxGroup, ColorCheckbox, SettingItem},
computed: {
multipage () {
return this.$store.state.setting.multipage
multiPage () {
return this.$store.state.setting.multiPage
}
},
methods: {
@ -103,8 +103,8 @@ export default {
clipboard.destroy()
})
},
setMultipage (checked) {
this.$store.commit('setting/setMultipage', checked)
setMultiPage (checked) {
this.$store.commit('setting/setMultiPage', checked)
}
}
}

@ -3,7 +3,7 @@
<contextmenu :itemList="menuItemList" :visible.sync="menuVisible" @select="onMenuSelect" />
<a-tabs
@contextmenu.native="e => onContextmenu(e)"
v-if="multipage"
v-if="multiPage"
:active-key="activePage"
style="margin-top: -8px; margin-bottom: 8px"
:hide-add="true"
@ -15,7 +15,7 @@
</a-tab-pane>
</a-tabs>
<transition name="page-toggle">
<keep-alive v-if="multipage">
<keep-alive v-if="multiPage">
<router-view />
</keep-alive>
<router-view v-else />
@ -43,8 +43,8 @@ export default {
}
},
computed: {
multipage () {
return this.$store.state.setting.multipage
multiPage () {
return this.$store.state.setting.multiPage
}
},
created () {
@ -55,7 +55,7 @@ export default {
watch: {
'$route': function (newRoute) {
this.activePage = newRoute.fullPath
if (!this.multipage) {
if (!this.multiPage) {
this.linkList = [newRoute.fullPath]
this.pageList = [newRoute]
} else if (this.linkList.indexOf(newRoute.fullPath) < 0) {
@ -66,7 +66,7 @@ export default {
'activePage': function (key) {
this.$router.push(key)
},
'multipage': function (newVal) {
'multiPage': function (newVal) {
if (!newVal) {
this.linkList = [this.$route.fullPath]
this.pageList = [this.$route]

@ -4,7 +4,7 @@
<img :src="extraImage"/>
</div>
<transition name="page-toggle">
<keep-alive v-if="multipage">
<keep-alive v-if="multiPage">
<router-view ref="page" />
</keep-alive>
<router-view ref="page" v-else />
@ -26,8 +26,8 @@ export default {
}
},
computed: {
multipage () {
return this.$store.state.setting.multipage
multiPage () {
return this.$store.state.setting.multiPage
}
},
mounted () {

@ -1,6 +1,6 @@
<template>
<transition name="page-toggle">
<keep-alive v-if="multipage">
<keep-alive v-if="multiPage">
<router-view />
</keep-alive>
<router-view v-else />
@ -11,8 +11,8 @@
export default {
name: 'RouteView',
computed: {
multipage () {
return this.$store.state.setting.multipage
multiPage () {
return this.$store.state.setting.multiPage
}
}
}

@ -11,7 +11,7 @@ export default {
{link: 'https://github.com/iczer/vue-antd-admin', icon: 'github'},
{link: 'https://ant.design', name: 'Ant Design'}
],
multipage: true
multiPage: true
},
mutations: {
setDevice (state, isMobile) {
@ -23,8 +23,8 @@ export default {
setLayout (state, layout) {
state.layout = layout
},
setMultipage (state, multipage) {
state.multipage = multipage
setMultiPage (state, multiPage) {
state.multiPage = multiPage
}
}
}

Loading…
Cancel
Save