fix: bug#18733

This commit is contained in:
XieYongHong 2023-10-23 09:36:46 +08:00
parent 50a9d83270
commit 057de400fe
2 changed files with 18 additions and 7 deletions

View File

@ -109,9 +109,13 @@ const upperOptions = computed(() => {
});
const onChange = () => {
const objValue: any = { source: _source.value, value: _value.value }
if (_source.value === 'upper') {
objValue.upperKey = _value.value
}
emit('update:value', _value.value);
emit('update:source', _source.value);
emit('change', { source: _source.value, value: _value.value });
emit('change', objValue);
};
watchEffect(() => {

View File

@ -173,11 +173,18 @@ const onChange = () => {
const onValueChange = (val: any, label: string) => {
const optionColumn = isObject(val) && (val as any).metadata ? [(val as any).column] : []
const obj = {
[`${propertyModelRef.properties}`]: {
const objectValue: any = {
value: propertyModelRef?.propertiesValue,
source: propertyModelRef?.source,
},
}
if (propertyModelRef?.source === 'upper') {
objectValue.upperKey = propertyModelRef?.propertiesValue
}
const obj = {
[`${propertyModelRef.properties}`]: objectValue
};
emit('update:value', obj);
emit('change', label || val, optionColumn)