update: geoComponent添加change事件
This commit is contained in:
parent
8c2af7fe76
commit
00ca314972
|
@ -45,6 +45,7 @@ initAMapApiLoader({
|
|||
|
||||
interface EmitProps {
|
||||
(e: 'update:point', data: string): void;
|
||||
(e: 'change', data: string): void;
|
||||
}
|
||||
const props = defineProps({
|
||||
point: { type: [Number, String], default: '' },
|
||||
|
@ -59,6 +60,7 @@ const inputPoint = computed({
|
|||
set: (val: any) => {
|
||||
mapPoint.value = val;
|
||||
emit('update:point', val);
|
||||
emit('change', val);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
<GeoComponent
|
||||
v-else-if="typeMap.get(itemType) === 'geoPoint'"
|
||||
v-model:point="myValue"
|
||||
@change='inputChange'
|
||||
/>
|
||||
<j-input
|
||||
v-else-if="typeMap.get(itemType) === 'file'"
|
||||
|
@ -172,7 +173,7 @@ const objectValue = ref<string>('');
|
|||
const handleItemModalSubmit = () => {
|
||||
myValue.value = objectValue.value.replace(/[\r\n]\s*/g, '');
|
||||
modalVis.value = false;
|
||||
emit('change', myValue.value);
|
||||
inputChange(myValue.value)
|
||||
};
|
||||
|
||||
// 文件上传
|
||||
|
|
Loading…
Reference in New Issue