no message
Former-commit-id: 7e513c97c26d9754d8fab64646a50753f1df1118 [formerly 7e513c97c26d9754d8fab64646a50753f1df1118 [formerly 7e513c97c26d9754d8fab64646a50753f1df1118 [formerly 7e513c97c26d9754d8fab64646a50753f1df1118 [formerly 91f532a5047318dde852fe3f7e10003864d7e307 [formerly d95550e0ac8a0e3fe4c0448fe1a1a8f586dc6275]]]]] Former-commit-id: aafabf8fa36964b37a9a472984e87933ebad3307 Former-commit-id: a8dcc0f4537b58d4b9af80a985b207bb4efa5a56 Former-commit-id: f6948f3d96dccd591e2c2808639b1da0c88e437c [formerly 66eb59c5bb2af93413d3861dc5a12409fea8593d] Former-commit-id: 944c9c17f21323650b4a0375154588114c36a8f8 Former-commit-id: 146eaee14c4bd335ff951c7f279cd9db86786174 Former-commit-id: 6cf031e20f126b0a1ce11ac51a30733b6bd1d6e7 Former-commit-id: 3af837919e5be12eac163cb1f6401737a4cc51f9 Former-commit-id: 56e92dc22a2c9f33efba8af0dd2d5546b01c847f
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
"lodash.clonedeep": "^4.5.0",
|
"lodash.clonedeep": "^4.5.0",
|
||||||
"lodash.get": "^4.4.2",
|
"lodash.get": "^4.4.2",
|
||||||
"lodash.uniqueid": "^4.0.1",
|
"lodash.uniqueid": "^4.0.1",
|
||||||
|
"lowdb": "^1.0.0",
|
||||||
"marked": "^0.3.9",
|
"marked": "^0.3.9",
|
||||||
"mockjs": "^1.0.1-beta3",
|
"mockjs": "^1.0.1-beta3",
|
||||||
"papaparse": "^4.3.6",
|
"papaparse": "^4.3.6",
|
||||||
|
|||||||
29
src/assets/style/theme/list.js
Normal file
29
src/assets/style/theme/list.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
export default [
|
||||||
|
{
|
||||||
|
name: 'd2admin 经典',
|
||||||
|
value: 'd2',
|
||||||
|
preview: 'static/image/theme/d2/preview@2x.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '紫罗兰',
|
||||||
|
value: 'violet',
|
||||||
|
preview: 'static/image/theme/violet/preview@2x.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '简约线条',
|
||||||
|
value: 'line',
|
||||||
|
backgroundImage: 'static/image/bg/line-squashed.jpg',
|
||||||
|
preview: 'static/image/theme/line/preview@2x.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '流星',
|
||||||
|
value: 'star',
|
||||||
|
backgroundImage: 'static/image/bg/star-squashed.jpg',
|
||||||
|
preview: 'static/image/theme/star/preview@2x.png'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Tomorrow Night Blue (vsCode)',
|
||||||
|
value: 'tomorrow-night-blue',
|
||||||
|
preview: 'static/image/theme/tomorrow-night-blue/preview@2x.png'
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="address" align="center">
|
<el-table-column prop="address" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="themeName === scope.row.value" type="success" icon="el-icon-check" round>已激活</el-button>
|
<el-button v-if="themeActive.value === scope.row.value" type="success" icon="el-icon-check" round>已激活</el-button>
|
||||||
<el-button v-else round @click="handleSelectTheme(scope.row.value)">使用</el-button>
|
<el-button v-else round @click="handleSelectTheme(scope.row.value)">使用</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -27,16 +27,16 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
themeList: state => state.theme.list,
|
themeList: state => state.d2admin.themeList,
|
||||||
themeName: state => state.theme.name
|
themeActive: state => state.d2admin.themeActive
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations([
|
...mapMutations([
|
||||||
'setTheme'
|
'setTheme'
|
||||||
]),
|
]),
|
||||||
handleSelectTheme (themeName) {
|
handleSelectTheme (name) {
|
||||||
this.setTheme(themeName)
|
this.setTheme(name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import Vuex from 'vuex'
|
|||||||
|
|
||||||
import d2admin from './modules/d2admin'
|
import d2admin from './modules/d2admin'
|
||||||
|
|
||||||
import menu from './modules/menu'
|
|
||||||
import theme from './modules/theme'
|
import theme from './modules/theme'
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
@@ -11,7 +10,6 @@ Vue.use(Vuex)
|
|||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
modules: {
|
modules: {
|
||||||
d2admin,
|
d2admin,
|
||||||
menu,
|
|
||||||
theme
|
theme
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
import util from '@/libs/util.js'
|
import util from '@/libs/util.js'
|
||||||
|
|
||||||
|
import themeList from '@/assets/style/theme/list.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
state: {
|
state: {
|
||||||
// 系统
|
// 系统
|
||||||
appName: 'D2Admin',
|
appName: 'D2Admin',
|
||||||
// 全屏
|
// 全屏
|
||||||
isFullScreen: false
|
isFullScreen: false,
|
||||||
|
// 主题
|
||||||
|
themeList,
|
||||||
|
themeActive: themeList[0]
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
/**
|
/**
|
||||||
* 切换全屏
|
* 切换全屏
|
||||||
* @param {state} state
|
* @param {state} state vuex state
|
||||||
*/
|
*/
|
||||||
toggleFullScreen (state) {
|
toggleFullScreen (state) {
|
||||||
if (state.isFullScreen) {
|
if (state.isFullScreen) {
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
export default {
|
|
||||||
state: {
|
|
||||||
sideMenu: []
|
|
||||||
},
|
|
||||||
mutations: {
|
|
||||||
setSideMenu (state, {sideMenu}) {
|
|
||||||
state.sideMenu = sideMenu
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user