no message

Former-commit-id: e4cddce22b77cce9272db50784bec6f65d436e1c [formerly e4cddce22b77cce9272db50784bec6f65d436e1c [formerly e4cddce22b77cce9272db50784bec6f65d436e1c [formerly e4cddce22b77cce9272db50784bec6f65d436e1c [formerly fd9e060be9dcd544a03898f52870c75bff426ea8 [formerly 473a2358ee44c1b87e6ee1d00a1a7e19e3e12819]]]]]
Former-commit-id: b51f6f065b1cc8a1a355344acc8fa08aa6182c75
Former-commit-id: ec8463f5a7f62ae1e071b469917e43330afcfde0
Former-commit-id: 4bfff65c75cb8e5114a89c078f48cfa153cbe706 [formerly 669d106d5745198c87f621ff9e96d9f4d9c74e19]
Former-commit-id: 54c7d47caa9891fe38ae6a579f40bbd5404720c4
Former-commit-id: 8445355687bf75530d17472caa5ae6c02fd9afda
Former-commit-id: 90db684d4f5dcafca3878dacecd324f805a0e873
Former-commit-id: d00f2808825956c14badf04aedf487481ec22c79
Former-commit-id: e611a922d08c6143e25b036242c452f4e543a4f0
This commit is contained in:
liyang
2018-07-02 16:30:32 +08:00
parent d5685a5dfd
commit cd4ffd40ee

View File

@@ -66,18 +66,13 @@ export default {
}, },
/** /**
* @class 通用工具 * @class 通用工具
* @description 数据库中的某项数据拿到 vuex 需要 uuid * @description 数据库取值到 vuex 需要 uuid
* @param {state} state vuex state * @param {state} state vuex state
* @param {string} key key name * @param {object} param1 key and default value
* @param {*} defaultValue default value
*/ */
d2adminDb2VuexByUuid (state, key, defaultValue) { d2adminDb2VuexByUuid (state, { key, defaultValue }) {
const row = db.get(key).find({uuid: util.uuid()}).value() const row = db.get(key).find({uuid: util.uuid()}).value()
if (row) { state[key] = row ? row.value : defaultValue
state[key] = row.value
} else {
state[key] = defaultValue
}
}, },
/** /**
* @description 更新远端的版本信息 * @description 更新远端的版本信息
@@ -145,7 +140,10 @@ export default {
* @param {state} state vuex state * @param {state} state vuex state
*/ */
d2adminPageOpenedListLoad (state) { d2adminPageOpenedListLoad (state) {
this.commit('d2adminDb2VuexByUuid', 'pageOpenedList', state.pageOpenedList) this.commit('d2adminDb2VuexByUuid', {
key: 'pageOpenedList',
defaultValue: state.pageOpenedList
})
}, },
/** /**
* @class pageOpenedList * @class pageOpenedList
@@ -310,7 +308,10 @@ export default {
* @param {state} state vuex state * @param {state} state vuex state
*/ */
d2adminThemeLoad (state) { d2adminThemeLoad (state) {
this.commit('d2adminDb2VuexByUuid', 'themeActiveName', state.themeList[0].name) this.commit('d2adminDb2VuexByUuid', {
key: 'themeActiveName',
defaultValue: state.themeList[0].name
})
this.commit('d2adminTheme2dom') this.commit('d2adminTheme2dom')
} }
} }