[issues/5003]表单开发j-category-select placeholder不显示问题

pull/581/head
zhangdaiscott 2023-06-07 09:22:54 +08:00
parent 17f414f04d
commit 1d7dfd299e
1 changed files with 4 additions and 2 deletions

View File

@ -71,7 +71,7 @@
required: false,
},
},
emits: ['options-change', 'change'],
emits: ['options-change', 'change', 'update:value'],
setup(props, { emit, refs }) {
console.info(props);
const emitData = ref<any[]>([]);
@ -122,7 +122,7 @@
if(props.multiple){
treeValue.value = [];
}else{
treeValue.value = '';
treeValue.value = null;
}
} else {
loadDictItem({ ids: props.value }).then((res) => {
@ -153,6 +153,7 @@
obj[props.back] = label;
}
emit('change', value, obj);
emit("update:value",value)
}
function asyncLoadTreeData(treeNode) {
@ -205,6 +206,7 @@
if (!value) {
emit('change', '');
treeValue.value = '';
emit("update:value",'')
} else if (Array.isArray(value)) {
let labels = [];
let values = value.map((item) => {