mirror of https://gitee.com/xiaonuobase/snowy
【更新】兼容formStyle
parent
2c6ec39122
commit
1ea621bf5a
|
@ -80,8 +80,8 @@
|
|||
</a-form-item>
|
||||
<a-form-item label="表单风格">
|
||||
<a-select
|
||||
v-model:value="formStyle"
|
||||
style="width: 80px"
|
||||
:value="formStyle"
|
||||
class="w-[80px]"
|
||||
size="small"
|
||||
:options="xnFormStyleOptions"
|
||||
@change="formStyleChange"
|
||||
|
@ -172,7 +172,8 @@
|
|||
'breadcrumbOpen',
|
||||
'moduleUnfoldOpen',
|
||||
'topHanderThemeColorOpen',
|
||||
'topHanderThemeColorSpread'
|
||||
'topHanderThemeColorSpread',
|
||||
'formStyle'
|
||||
])
|
||||
},
|
||||
mounted() {},
|
||||
|
@ -209,7 +210,7 @@
|
|||
// 切换表单风格
|
||||
formStyleChange(value) {
|
||||
tool.data.set('SNOWY_FORM_STYLE', value)
|
||||
this.$store.commit('SET_formStyle', value)
|
||||
this.globalStore.setFormStyle(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -42,6 +42,8 @@ export const globalStore = defineStore({
|
|||
theme: getCacheConfig('SNOWY_THEME'),
|
||||
// 主题颜色
|
||||
themeColor: toolDataGet('SNOWY_THEME_COLOR') || config.COLOR,
|
||||
// 整体表单风格
|
||||
formStyle: getCacheConfig('SNOWY_FORM_STYLE'),
|
||||
// 用户信息
|
||||
userInfo: toolDataGet('USER_INFO') || {},
|
||||
// 系统配置
|
||||
|
@ -72,23 +74,8 @@ export const globalStore = defineStore({
|
|||
toggleConfig(key) {
|
||||
this[key] = !this[key]
|
||||
},
|
||||
toggle_SideUniqueOpen() {
|
||||
this.sideUniqueOpen = !this.sideUniqueOpen
|
||||
},
|
||||
toggle_LayoutTagsOpen() {
|
||||
this.layoutTagsOpen = !this.layoutTagsOpen
|
||||
},
|
||||
toggle_BreadcrumbOpen() {
|
||||
this.breadcrumbOpen = !this.breadcrumbOpen
|
||||
},
|
||||
toggle_TopHanderThemeColorOpen() {
|
||||
this.topHanderThemeColorOpen = !this.topHanderThemeColorOpen
|
||||
},
|
||||
toggle_TopHanderThemeColorSpread() {
|
||||
this.topHanderThemeColorSpread = !this.topHanderThemeColorSpread
|
||||
},
|
||||
toggle_ModuleUnfoldOpen() {
|
||||
this.moduleUnfoldOpen = !this.moduleUnfoldOpen
|
||||
setFormStyle(key) {
|
||||
this.formStyle = key
|
||||
},
|
||||
setUserInfo(key) {
|
||||
this.userInfo = key
|
||||
|
|
Loading…
Reference in New Issue