fix:调整 user 的 props.id 参数,避免 Vue warn 告警

This commit is contained in:
YunaiV
2025-12-15 14:09:38 +08:00
parent 7235595361
commit 5aa28bc1d2
4 changed files with 7 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ import { resetUserPassword } from '@/api/system/user'
const props = defineProps<{
modelValue: boolean
userId: number
userId: number | any
}>()
const emit = defineEmits<{

View File

@@ -28,7 +28,7 @@ import { assignUserRole, getUserRoleIds } from '@/api/system/user'
const props = defineProps<{
modelValue: boolean
userId: number
userId: number | any
}>()
const emit = defineEmits<{

View File

@@ -61,9 +61,9 @@
<!-- 更多操作菜单 -->
<wd-action-sheet v-model="moreActionVisible" :actions="moreActions" @select="handleMoreAction" />
<!-- 重置密码弹窗 -->
<PasswordForm v-model="passwordFormVisible" :user-id="Number(props.id)" @success="getDetail" />
<PasswordForm v-model="passwordFormVisible" :user-id="props.id" @success="getDetail" />
<!-- 分配角色弹窗 -->
<RoleAssignForm v-model="roleAssignFormVisible" :user-id="Number(props.id)" @success="getDetail" />
<RoleAssignForm v-model="roleAssignFormVisible" :user-id="props.id" @success="getDetail" />
</view>
</template>
@@ -80,7 +80,7 @@ import RoleAssignForm from './components/role-assign-form.vue'
import { navigateBackPlus } from '@/utils';
const props = defineProps<{
id: string
id?: number | any
}>()
definePage({
@@ -127,7 +127,7 @@ async function getDetail() {
}
try {
toast.loading('加载中...')
formData.value = await getUser(Number(props.id))
formData.value = await getUser(props.id)
} finally {
toast.close()
}

View File

@@ -109,7 +109,7 @@ import PostPicker from './components/post-picker.vue'
import { navigateBackPlus } from '@/utils';
const props = defineProps<{
id?: string
id?: number | any
}>()
definePage({