From bbcedd02baa053a88688a82fc72e87c857c82db2 Mon Sep 17 00:00:00 2001
From: dhb52 <dhb52@126.com>
Date: 星期三, 03 一月 2024 11:40:39 +0800
Subject: [PATCH] fix: 修复vscode全局属性ts爆红问题 参照vuejs官方文档,[扩展全局属性](https://cn.vuejs.org/guide/typescript/options-api.html#augmenting-global-properties),

---
 src/views/system/user/index.vue |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 56078d9..2de26a5 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -306,7 +306,7 @@
 import { globalHeaders } from '@/utils/request';
 
 const router = useRouter();
-const { proxy } = getCurrentInstance();
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { sys_normal_disable, sys_user_sex } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_user_sex'));
 const userList = ref<UserVO[]>();
 const loading = ref(true);
@@ -372,7 +372,8 @@
   postIds: [],
   roleIds: []
 };
-const data = reactive<PageData<UserForm, UserQuery>>({
+
+const initData: PageData<UserForm, UserQuery> = {
   form: { ...initFormData },
   queryParams: {
     pageNum: 1,
@@ -380,7 +381,8 @@
     userName: '',
     phonenumber: '',
     status: '',
-    deptId: ''
+    deptId: '',
+    roleId: ''
   },
   rules: {
     userName: [
@@ -417,7 +419,8 @@
       }
     ]
   }
-});
+};
+const data = reactive<PageData<UserForm, UserQuery>>(initData);
 
 const { queryParams, form, rules } = toRefs<PageData<UserForm, UserQuery>>(data);
 

--
Gitblit v1.9.3