From 4f71408684b2116c7ed98e1ec8b88c06d23d329e Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期五, 11 七月 2025 10:18:31 +0800 Subject: [PATCH] feat(web-antd): 全局注册 ant-design-vue 组件- 在 bootstrap.ts 中导入并注册 Antd - 此修改确保 ant-design-vue 组件可在整个应用中使用 --- eims-ui-mobile/src/store/user.ts | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/eims-ui-mobile/src/store/user.ts b/eims-ui-mobile/src/store/user.ts index 82bd873..73058d3 100644 --- a/eims-ui-mobile/src/store/user.ts +++ b/eims-ui-mobile/src/store/user.ts @@ -1,14 +1,15 @@ import { defineStore } from 'pinia' import { ref } from 'vue' +import type { UserInfoResp, UserInfo } from '@/service/login.d' -const initState = { nickname: '', avatar: '' } +const initState = null export const useUserStore = defineStore( - 'user', + 'userInfo', () => { - const userInfo = ref<IUserInfo>({ ...initState }) + const userInfo = ref<UserInfo>({ ...initState }) - const setUserInfo = (val: IUserInfo) => { + const setUserInfo = (val: UserInfo) => { userInfo.value = val } @@ -19,13 +20,11 @@ const reset = () => { userInfo.value = { ...initState } } - const isLogined = computed(() => !!userInfo.value.token) return { userInfo, setUserInfo, clearUserInfo, - isLogined, reset, } }, -- Gitblit v1.9.3