setting.user.info
Former-commit-id: 2b037474b07e50657678abc98c83ada463991475 [formerly 2b037474b07e50657678abc98c83ada463991475 [formerly 2b037474b07e50657678abc98c83ada463991475 [formerly 2b037474b07e50657678abc98c83ada463991475 [formerly cfd34ebc03b774ce56b1f70e48a186ed5f1a7332 [formerly f7a8b3b58e733acff905f29643c78cf0d68971dc]]]]] Former-commit-id: f835b546cb0ca44db26c5a2bc398365ea8917f2a Former-commit-id: e89fd4f8ceb3feeb19735730ff90b2020c45b68b Former-commit-id: cae751d7329f8a60e58ca988cffb50b79c0f2c45 [formerly 7b313d24cfcf14e36c353e550b5c5f0e63c7d12c] Former-commit-id: 5f5a9e12d01d79e8d51a59cb7d2060f5d142f3c9 Former-commit-id: 5cf6e118c28ad12bf5940b1fb2f9de82e7cb7b9c Former-commit-id: ac85bc6bedb18713c3fd547c92746ad265a2cc09 Former-commit-id: c3bb7d2ff234d281e26e33ef380b89fe6ab4cd90 Former-commit-id: b854199ec9d2f81d3ffc7d4ec5b79035a438bac3
This commit is contained in:
@@ -7,7 +7,7 @@ const setting = {
|
||||
transition: {
|
||||
active: true
|
||||
},
|
||||
// 在读取页面持久化数据失败时默认页面
|
||||
// 在读取持久化数据失败时默认页面
|
||||
page: {
|
||||
opened: [
|
||||
{
|
||||
@@ -54,6 +54,12 @@ const setting = {
|
||||
preview: 'image/theme/tomorrow-night-blue/preview@2x.png'
|
||||
}
|
||||
]
|
||||
},
|
||||
// 在读取持久化数据失败时默认用户信息
|
||||
user: {
|
||||
info: {
|
||||
name: 'Ghost'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// 设置文件
|
||||
import setting from '@/setting.js'
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
// 用户信息
|
||||
info: {
|
||||
name: ''
|
||||
}
|
||||
info: setting.user.info
|
||||
},
|
||||
mutations: {
|
||||
/**
|
||||
@@ -31,9 +32,7 @@ export default {
|
||||
state.info = await this.dispatch('d2admin/db/getByUser', {
|
||||
dbName: 'sys',
|
||||
path: 'user.info',
|
||||
defaultValue: {
|
||||
name: 'Ghost'
|
||||
}
|
||||
defaultValue: setting.user.info
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user