diff --git a/src/components/xtSelect/index.vue b/src/components/xtSelect/index.vue index a6924eb9..94c622a5 100644 --- a/src/components/xtSelect/index.vue +++ b/src/components/xtSelect/index.vue @@ -89,7 +89,7 @@ const props = defineProps({ options: { type: Array, default: null }, }); -const emit = defineEmits(["update:modelValue", "update:obj", "update:label", "change"]); +const emit = defineEmits(["update:modelValue", "update:obj", "change"]); const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true; // 控制 popover 显示与隐藏的状态 const showPopover = ref(false); @@ -189,8 +189,8 @@ const rowClick = (row) => { selectLabel.value = row[props.labelField]; selectValue.value = row[props.valueField]; showPopover.value = false; + emit("change", row); } - emit("change"); }; const handleClear = () => { @@ -202,8 +202,7 @@ const handleClear = () => { selectLabel.value = ""; selectValue.value = null; } - emit("update:label", ""); - emit("change"); + emit("change", props.multiple ? [] : null); }; const tdChange = (res, tableData) => { @@ -219,8 +218,7 @@ const selectionChange = (val) => { selectLabel.value = val .map((item) => item[props.labelField]) .join(props.splitField); - } - emit("update:label", val); - emit("change"); + emit("change", val); + } }; diff --git a/src/views/hrm/resignation_form.vue b/src/views/hrm/resignation_form.vue index 2f022b1b..b305a6e1 100644 --- a/src/views/hrm/resignation_form.vue +++ b/src/views/hrm/resignation_form.vue @@ -3,7 +3,17 @@ - {{ formData.employee_name }}({{ formData.belong_dept_name }} - {{ formData.post_name }}) + + + + +