【更新】替换旧的$store

pull/98/head
xlzy 2023-03-23 23:11:14 +08:00
parent 1ea621bf5a
commit 6913945e1b
2 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,8 @@
import { Drawer, Modal } from 'ant-design-vue'
import { modalProps } from 'ant-design-vue/es/modal/Modal'
import { drawerProps } from 'ant-design-vue/es/drawer'
import { mapState } from 'pinia'
import { globalStore } from '@/store'
const FormContainerTypeEnum = {
DRAWER: 'drawer',
@ -37,11 +39,12 @@
...drawerProps
},
computed: {
...mapState(globalStore, ['formStyle']),
slotKeys() {
return Object.keys(this.$slots)
},
isModal() {
return FormContainerTypeEnum.MODAL === this.$store.state.global.formStyle
return FormContainerTypeEnum.MODAL === this.formStyle
}
},
methods: {

View File

@ -94,7 +94,6 @@
return {
lang: [],
settingDialog: false,
userInfo: {},
userName: '',
userNameF: '',
setDeawer: import.meta.env.VITE_SET_DRAWER
@ -107,7 +106,6 @@
created() {
//
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.userNameF = this.userName.substring(0, 1)
},