mirror of https://gitee.com/xiaonuobase/snowy
【更新】替换旧的$store
parent
96fa681a91
commit
e5c7326a38
|
@ -15,6 +15,8 @@
|
||||||
import { Drawer, Modal } from 'ant-design-vue'
|
import { Drawer, Modal } from 'ant-design-vue'
|
||||||
import { modalProps } from 'ant-design-vue/es/modal/Modal'
|
import { modalProps } from 'ant-design-vue/es/modal/Modal'
|
||||||
import { drawerProps } from 'ant-design-vue/es/drawer'
|
import { drawerProps } from 'ant-design-vue/es/drawer'
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
import { globalStore } from '@/store'
|
||||||
|
|
||||||
const FormContainerTypeEnum = {
|
const FormContainerTypeEnum = {
|
||||||
DRAWER: 'drawer',
|
DRAWER: 'drawer',
|
||||||
|
@ -37,11 +39,12 @@
|
||||||
...drawerProps
|
...drawerProps
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(globalStore, ['formStyle']),
|
||||||
slotKeys() {
|
slotKeys() {
|
||||||
return Object.keys(this.$slots)
|
return Object.keys(this.$slots)
|
||||||
},
|
},
|
||||||
isModal() {
|
isModal() {
|
||||||
return FormContainerTypeEnum.MODAL === this.$store.state.global.formStyle
|
return FormContainerTypeEnum.MODAL === this.formStyle
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -94,7 +94,6 @@
|
||||||
return {
|
return {
|
||||||
lang: [],
|
lang: [],
|
||||||
settingDialog: false,
|
settingDialog: false,
|
||||||
userInfo: {},
|
|
||||||
userName: '',
|
userName: '',
|
||||||
userNameF: '',
|
userNameF: '',
|
||||||
setDeawer: import.meta.env.VITE_SET_DRAWER
|
setDeawer: import.meta.env.VITE_SET_DRAWER
|
||||||
|
@ -107,7 +106,6 @@
|
||||||
created() {
|
created() {
|
||||||
// 获取默认语言
|
// 获取默认语言
|
||||||
this.lang = new Array(this.$TOOL.data.get('APP_LANG') || this.$CONFIG.LANG)
|
this.lang = new Array(this.$TOOL.data.get('APP_LANG') || this.$CONFIG.LANG)
|
||||||
this.userInfo = this.$TOOL.data.get('USER_INFO')
|
|
||||||
this.userName = this.userInfo?.userName || ''
|
this.userName = this.userInfo?.userName || ''
|
||||||
this.userNameF = this.userName.substring(0, 1)
|
this.userNameF = this.userName.substring(0, 1)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue