Compare commits

..

No commits in common. "e6069242fe8521eefafb58a24cb6081b13bdf96a" and "a6d1b0170280021def2012306ab21e4d18894f3c" have entirely different histories.

1 changed files with 7 additions and 5 deletions

View File

@ -89,7 +89,7 @@ const props = defineProps({
options: { type: Array, default: null }, options: { type: Array, default: null },
}); });
const emit = defineEmits(["update:modelValue", "update:obj", "change"]); const emit = defineEmits(["update:modelValue", "update:obj", "update:label", "change"]);
const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true; const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true;
// popover // popover
const showPopover = ref(false); const showPopover = ref(false);
@ -189,8 +189,8 @@ const rowClick = (row) => {
selectLabel.value = row[props.labelField]; selectLabel.value = row[props.labelField];
selectValue.value = row[props.valueField]; selectValue.value = row[props.valueField];
showPopover.value = false; showPopover.value = false;
emit("change", row);
} }
emit("change");
}; };
const handleClear = () => { const handleClear = () => {
@ -202,7 +202,8 @@ const handleClear = () => {
selectLabel.value = ""; selectLabel.value = "";
selectValue.value = null; selectValue.value = null;
} }
emit("change", props.multiple ? [] : null); emit("update:label", "");
emit("change");
}; };
const tdChange = (res, tableData) => { const tdChange = (res, tableData) => {
@ -218,7 +219,8 @@ const selectionChange = (val) => {
selectLabel.value = val selectLabel.value = val
.map((item) => item[props.labelField]) .map((item) => item[props.labelField])
.join(props.splitField); .join(props.splitField);
emit("change", val); }
} emit("update:label", val);
emit("change");
}; };
</script> </script>