fix: 修复个人信息页面Form.useForm报错问题,改用reactive和ref

This commit is contained in:
小蟑螂
2026-03-27 23:01:43 +08:00
parent 3ef89675d4
commit 749779d452
@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { UserVO } from '#/api/system/user/types'; import type { UserVO } from '#/api/system/user/types';
import { ref } from 'vue'; import { reactive, ref } from 'vue';
import { Page } from '@vben/common-ui'; import { Page } from '@vben/common-ui';
@@ -18,13 +18,13 @@ const userInfo = ref<UserVO.UserInfoVO | null>(null);
const avatarLoading = ref(false); const avatarLoading = ref(false);
// 表单数据 // 表单数据
const formData = ref({ const formData = reactive({
realName: '', realName: '',
phone: '', phone: '',
remark: '', remark: '',
}); });
const [formRef] = Form.useForm(); const formRef = ref<any>(null);
async function fetchUserInfo() { async function fetchUserInfo() {
try { try {