mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 19:06:39 +08:00
修改DictSelect组件onChange事件
This commit is contained in:
parent
3ac76495ae
commit
66147e47da
@ -97,17 +97,7 @@
|
|||||||
const emit = defineEmits(['update:value', 'change']);
|
const emit = defineEmits(['update:value', 'change']);
|
||||||
|
|
||||||
function onChange(value) {
|
function onChange(value) {
|
||||||
if (!value) {
|
|
||||||
emit('update:value', []);
|
|
||||||
emit('change', []);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Array.isArray(value)) {
|
|
||||||
emit('update:value', value);
|
emit('update:value', value);
|
||||||
emit('change', value);
|
emit('change', value);
|
||||||
} else {
|
|
||||||
emit('update:value', [value]);
|
|
||||||
emit('change', [value]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user