🐛(component): 修复 layer 组件 end 触发两次的问题
This commit is contained in:
parent
8021404c34
commit
c3e88cfdab
@ -95,10 +95,10 @@ const intOption = () => {
|
||||
};
|
||||
|
||||
const handleRemove = (value: any) => {
|
||||
if(Array.isArray(selectedValue.value)) {
|
||||
selectedValue.value = selectedValue.value.filter(item => item != value);
|
||||
if (Array.isArray(selectedValue.value)) {
|
||||
selectedValue.value = selectedValue.value.filter((item) => item != value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
intOption();
|
||||
|
@ -327,7 +327,7 @@ watch(
|
||||
* 监听 visible 值
|
||||
* <p>
|
||||
*/
|
||||
watch(
|
||||
watch(
|
||||
() => visible.value,
|
||||
() => {
|
||||
if (visible.value) {
|
||||
@ -335,13 +335,20 @@ watch(
|
||||
firstOpenDelayCalculation();
|
||||
}
|
||||
props.success();
|
||||
} else {
|
||||
props.end();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => visible.value,
|
||||
() => {
|
||||
if (!visible.value) {
|
||||
props.end();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 高度监听
|
||||
* <p>
|
||||
|
Loading…
Reference in New Issue
Block a user