fix: bug#11087
This commit is contained in:
parent
5cf8ce8aff
commit
81f7e58c01
|
@ -157,15 +157,17 @@ const componentsType = ref<ITypes>({
|
|||
});
|
||||
const typeMap = new Map(Object.entries(componentsType.value));
|
||||
|
||||
const myValue = computed({
|
||||
get: () => {
|
||||
return props.modelValue;
|
||||
},
|
||||
set: (val: any) => {
|
||||
objectValue.value = val;
|
||||
emit('update:modelValue', val);
|
||||
},
|
||||
});
|
||||
// const myValue = computed({
|
||||
// get: () => {
|
||||
// return props.modelValue;
|
||||
// },
|
||||
// set: (val: any) => {
|
||||
// objectValue.value = val;
|
||||
// emit('update:modelValue', val);
|
||||
// },
|
||||
// });
|
||||
|
||||
const myValue = ref(props.modelValue)
|
||||
|
||||
// 代码编辑器弹窗
|
||||
const modalVis = ref<boolean>(false);
|
||||
|
@ -174,6 +176,7 @@ const handleItemModalSubmit = () => {
|
|||
myValue.value = objectValue.value.replace(/[\r\n]\s*/g, '');
|
||||
modalVis.value = false;
|
||||
emit('change', objectValue.value)
|
||||
emit('update:modelValue', myValue.value);
|
||||
};
|
||||
|
||||
// 文件上传
|
||||
|
@ -189,20 +192,26 @@ const handleFileChange = (info: UploadChangeParam<UploadFile<any>>) => {
|
|||
|
||||
const selectChange = (e: string, option: any) => {
|
||||
emit('change', e, option)
|
||||
emit('update:modelValue', myValue.value);
|
||||
}
|
||||
|
||||
const timeChange = (e: any) => {
|
||||
emit('change', e)
|
||||
emit('update:modelValue', myValue.value);
|
||||
}
|
||||
|
||||
const inputChange = (e: any) => {
|
||||
emit('change', e && e.target ? e.target.value : e)
|
||||
emit('update:modelValue', myValue.value);
|
||||
}
|
||||
|
||||
const dateChange = (e: any) => {
|
||||
emit('change', e)
|
||||
emit('update:modelValue', myValue.value);
|
||||
}
|
||||
|
||||
myValue.value = props.modelValue
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
|
|
|
@ -71,7 +71,7 @@ import { queryPlatformNoPage, recharge } from '@/api/iot-card/cardManagement';
|
|||
import { message } from 'jetlinks-ui-components';
|
||||
import { PaymentMethod } from '@/views/iot-card/data';
|
||||
|
||||
const emit = defineEmits(['change']);
|
||||
const emit = defineEmits(['change', 'save']);
|
||||
|
||||
const btnLoading = ref<boolean>(false);
|
||||
const configList = ref<Record<string, any>[]>([]);
|
||||
|
@ -171,7 +171,7 @@ const handleOk = () => {
|
|||
} else {
|
||||
window.open(resp.result);
|
||||
}
|
||||
emit('change');
|
||||
emit('change', true);
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue