haiwei-skins-classics 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<!--导航栏-->
|
|
9
9
|
<section class="nm-header-nav">
|
|
10
10
|
<ul>
|
|
11
|
-
<template v-for="menu in menus">
|
|
12
|
-
<li :class="['nm-header-nav-item', menu.id === curr ? 'active' : '']"
|
|
11
|
+
<template v-for="menu in menus" :key="menu.id">
|
|
12
|
+
<li :class="['nm-header-nav-item', menu.id === curr ? 'active' : '']">
|
|
13
13
|
<a href="javascript:void(0)" @click.prevent="onNavClick(menu)">
|
|
14
14
|
<nm-icon class="nm-header-nav-item-icon" :name="menu.icon" :style="{ color: menu.iconColor }" />
|
|
15
15
|
<span class="nm-header-nav-item-text">{{ menu.name }}</span>
|
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
computed: {
|
|
38
|
-
...mapState('app/
|
|
38
|
+
...mapState('app/config', { sys: s => s.system }),
|
|
39
39
|
...mapState('app/account', ['menus', 'routeMenus']),
|
|
40
40
|
...mapState('app/page', ['current'])
|
|
41
41
|
},
|
|
@@ -28,16 +28,39 @@
|
|
|
28
28
|
</section>
|
|
29
29
|
</template>
|
|
30
30
|
<script>
|
|
31
|
-
import { mapState, mapActions } from 'vuex'
|
|
31
|
+
import { mapState, mapActions, mapMutations } from 'vuex'
|
|
32
32
|
import NmMenus from '../menus'
|
|
33
33
|
export default {
|
|
34
34
|
components: { NmMenus },
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
routerViewVisible: true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
35
40
|
computed: {
|
|
36
41
|
...mapState('app/skins/classics/sidebar', { sidebarCollapse: 'collapse' }),
|
|
37
|
-
...mapState('app/page', ['keepAlive'])
|
|
42
|
+
...mapState('app/page', ['keepAlive']),
|
|
43
|
+
...mapState('app/skins', ['current']),
|
|
44
|
+
fontSize() {
|
|
45
|
+
return this.current.fontSize || 'default'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
provide() {
|
|
49
|
+
return {
|
|
50
|
+
reload: this.reload
|
|
51
|
+
}
|
|
38
52
|
},
|
|
39
53
|
methods: {
|
|
40
|
-
...mapActions('app/skins/classics/sidebar', { sidebarToggle: 'toggle' })
|
|
54
|
+
...mapActions('app/skins/classics/sidebar', { sidebarToggle: 'toggle' }),
|
|
55
|
+
...mapMutations('app/page', ['keepAliveRemove']),
|
|
56
|
+
reload(name) {
|
|
57
|
+
this.routerViewVisible = false
|
|
58
|
+
this.keepAliveRemove(name)
|
|
59
|
+
|
|
60
|
+
this.$nextTick(() => {
|
|
61
|
+
this.routerViewVisible = true
|
|
62
|
+
})
|
|
63
|
+
}
|
|
41
64
|
}
|
|
42
65
|
}
|
|
43
66
|
</script>
|
|
@@ -19,7 +19,7 @@ import { mapState } from 'vuex'
|
|
|
19
19
|
export default {
|
|
20
20
|
components: { MenuItem },
|
|
21
21
|
computed: {
|
|
22
|
-
...mapState('app/
|
|
22
|
+
...mapState('app/config', { uniqueOpened: s => s.component.menu.uniqueOpened }),
|
|
23
23
|
...mapState('app/skins/classics/sidebar', ['collapse']),
|
|
24
24
|
...mapState('app/skins/classics', ['menus']),
|
|
25
25
|
...mapState('app/account', ['routeMenus']),
|