物业之前,新工作台

This commit is contained in:
Zy
2026-04-16 21:03:35 +08:00
parent cf9a1f1585
commit 4184f1c55d
91 changed files with 1781 additions and 588 deletions

View File

@@ -106,7 +106,7 @@ const props = defineProps<{
// ✅ 手动设置默认值(替代 withDefaults
const isMultiple = computed(() => props.isMultiple ?? false);
const returnvalue = computed(() => props.returnvalue ?? 'userId'); // 👈 默认 userId
const returnvalue = computed(() => props.returnvalue ?? 'id'); // 👈 默认 userId
const { userid } = toRefs(props);
@@ -267,6 +267,7 @@ function confirm() {
// ✅ 返回整个对象
emit('change', multipleSelection.value[0]);
} else {
console.log(multipleSelection.value[0], returnvalue.value);
// 返回指定字段
emit('change', multipleSelection.value[0][returnvalue.value as keyof tableType]);
}

View File

@@ -120,7 +120,6 @@ const handleRowClick = (row: tableType) => {
// 统一回显 userid 选中(安全版)
const handleUserSelection = () => {
if (!userid.value || !tableData.value.length) return;
console.log('user', userid, tableData.value);
const target = tableData.value.find((item) => item.userId == userid.value);
if (target) {