no message
Former-commit-id: 128a2228a59970be5f0da99ca899a073fccc1db1 [formerly 128a2228a59970be5f0da99ca899a073fccc1db1 [formerly 128a2228a59970be5f0da99ca899a073fccc1db1 [formerly 128a2228a59970be5f0da99ca899a073fccc1db1 [formerly 2116c12aeb474caf48b65b8083be7afb96dd0ba0 [formerly ca04947609f55ababcd4a645e6bbd4ba5023b8df]]]]] Former-commit-id: 981fa7559bd053f3dc14f6b9d6613eddbf705036 Former-commit-id: 493371e298d61022d12ad82d6e298ce285118ecc Former-commit-id: b3b67960c88870126ba8c8534f3152935df31bb2 [formerly df0d241cadbe58f6024f2c4b8194e7642625679d] Former-commit-id: f2982fb8ec9796b21a77892af2e94726e8acec64 Former-commit-id: 01dc5532089891c1e45814afb526121733f3fc6a Former-commit-id: 4fd3f2e5a1bcacd714097f2e9d488c7947f4771a Former-commit-id: f89e3a2501109287372109f63ceeff17e14da417 Former-commit-id: 147c8432cee67da070d60d56cb8b2f7d8fe06e49
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
|
// polyfill
|
||||||
import 'babel-polyfill'
|
import 'babel-polyfill'
|
||||||
|
|
||||||
|
// Vue
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import App from './App'
|
import App from './App'
|
||||||
|
|
||||||
|
// 多国语
|
||||||
import i18n from './i18n'
|
import i18n from './i18n'
|
||||||
|
|
||||||
// 工具
|
// 工具
|
||||||
@@ -15,6 +19,7 @@ import router from './router'
|
|||||||
// 框架内的路由
|
// 框架内的路由
|
||||||
import { frameInRoutes } from '@/router/routes'
|
import { frameInRoutes } from '@/router/routes'
|
||||||
|
|
||||||
|
// ElementUI
|
||||||
import ElementUI from 'element-ui'
|
import ElementUI from 'element-ui'
|
||||||
import 'element-ui/lib/theme-chalk/index.css'
|
import 'element-ui/lib/theme-chalk/index.css'
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default {
|
|||||||
* @description 将 state 中某一项存储到数据库
|
* @description 将 state 中某一项存储到数据库
|
||||||
* @param {state} state vuex state
|
* @param {state} state vuex state
|
||||||
*/
|
*/
|
||||||
d2adminVuex2Db (state, key) {
|
d2adminVuex2DbByUuid (state, key) {
|
||||||
const setting = db.get(key).find({uuid: util.uuid()})
|
const setting = db.get(key).find({uuid: util.uuid()})
|
||||||
if (setting.value()) {
|
if (setting.value()) {
|
||||||
setting.assign({value: state[key]}).write()
|
setting.assign({value: state[key]}).write()
|
||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
page.query = query || page.query
|
page.query = query || page.query
|
||||||
state.pageOpenedList.splice(index, 1, page)
|
state.pageOpenedList.splice(index, 1, page)
|
||||||
// 更新设置到数据库
|
// 更新设置到数据库
|
||||||
this.commit('d2adminVuex2Db', 'pageOpenedList')
|
this.commit('d2adminVuex2DbByUuid', 'pageOpenedList')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @class pageOpenedList
|
* @class pageOpenedList
|
||||||
@@ -138,7 +138,7 @@ export default {
|
|||||||
// 添加进当前显示的页面数组
|
// 添加进当前显示的页面数组
|
||||||
state.pageOpenedList.push(newPage)
|
state.pageOpenedList.push(newPage)
|
||||||
// 更新设置到数据库
|
// 更新设置到数据库
|
||||||
this.commit('d2adminVuex2Db', 'pageOpenedList')
|
this.commit('d2adminVuex2DbByUuid', 'pageOpenedList')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @class pageOpenedList
|
* @class pageOpenedList
|
||||||
@@ -153,7 +153,7 @@ export default {
|
|||||||
state.pageOpenedList.splice(index, 1)
|
state.pageOpenedList.splice(index, 1)
|
||||||
}
|
}
|
||||||
// 更新设置到数据库
|
// 更新设置到数据库
|
||||||
this.commit('d2adminVuex2Db', 'pageOpenedList')
|
this.commit('d2adminVuex2DbByUuid', 'pageOpenedList')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @class pageOpenedList
|
* @class pageOpenedList
|
||||||
@@ -171,7 +171,7 @@ export default {
|
|||||||
state.pageOpenedList.splice(1, currentIndex - 1)
|
state.pageOpenedList.splice(1, currentIndex - 1)
|
||||||
}
|
}
|
||||||
// 更新设置到数据库
|
// 更新设置到数据库
|
||||||
this.commit('d2adminVuex2Db', 'pageOpenedList')
|
this.commit('d2adminVuex2DbByUuid', 'pageOpenedList')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @class pageOpenedList
|
* @class pageOpenedList
|
||||||
@@ -187,7 +187,7 @@ export default {
|
|||||||
})
|
})
|
||||||
state.pageOpenedList.splice(currentIndex + 1)
|
state.pageOpenedList.splice(currentIndex + 1)
|
||||||
// 更新设置到数据库
|
// 更新设置到数据库
|
||||||
this.commit('d2adminVuex2Db', 'pageOpenedList')
|
this.commit('d2adminVuex2DbByUuid', 'pageOpenedList')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @class pageOpenedList
|
* @class pageOpenedList
|
||||||
@@ -208,7 +208,7 @@ export default {
|
|||||||
state.pageOpenedList.splice(1, currentIndex - 1)
|
state.pageOpenedList.splice(1, currentIndex - 1)
|
||||||
}
|
}
|
||||||
// 更新设置到数据库
|
// 更新设置到数据库
|
||||||
this.commit('d2adminVuex2Db', 'pageOpenedList')
|
this.commit('d2adminVuex2DbByUuid', 'pageOpenedList')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @class pageOpenedList
|
* @class pageOpenedList
|
||||||
@@ -218,7 +218,7 @@ export default {
|
|||||||
d2adminTagCloseAll (state) {
|
d2adminTagCloseAll (state) {
|
||||||
state.pageOpenedList.splice(1)
|
state.pageOpenedList.splice(1)
|
||||||
// 更新设置到数据库
|
// 更新设置到数据库
|
||||||
this.commit('d2adminVuex2Db', 'pageOpenedList')
|
this.commit('d2adminVuex2DbByUuid', 'pageOpenedList')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @class isFullScreen
|
* @class isFullScreen
|
||||||
@@ -270,7 +270,7 @@ export default {
|
|||||||
// 设置 dom
|
// 设置 dom
|
||||||
document.body.className = `theme-${state.themeActiveName}`
|
document.body.className = `theme-${state.themeActiveName}`
|
||||||
// 保存到数据库
|
// 保存到数据库
|
||||||
this.commit('d2adminVuex2Db', 'themeActiveName')
|
this.commit('d2adminVuex2DbByUuid', 'themeActiveName')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @class themeActiveName
|
* @class themeActiveName
|
||||||
|
|||||||
Reference in New Issue
Block a user