@vunk/form 1.1.24 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock, createElementBlock, createElementVNode, defineComponent, resolveComponent, createBlock, withCtx, createVNode, createCommentVNode, provide, renderSlot, shallowRef, computed, onMounted,
|
|
1
|
+
import { openBlock, createElementBlock, createElementVNode, defineComponent, resolveComponent, createBlock, withCtx, createVNode, createCommentVNode, provide, renderSlot, shallowRef, computed, ref, watch, onMounted, nextTick, mergeProps, toHandlers, withDirectives, vShow } from 'vue';
|
|
2
2
|
import { _VkfInputCtx, VkfInput } from '@vunk/form/components/input';
|
|
3
3
|
import { EMPTY_FEATURE_COLLECTION } from '@vumap/core/shared/static';
|
|
4
4
|
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
@@ -1309,8 +1309,15 @@ var _sfc_main = defineComponent({
|
|
|
1309
1309
|
return EDIT_TYPE_REFLECT[props2.editTypes].availableCreatureTools;
|
|
1310
1310
|
}
|
|
1311
1311
|
});
|
|
1312
|
+
const sketchValueUpdating = ref(false);
|
|
1312
1313
|
const sketchValue = shallowRef([]);
|
|
1313
|
-
|
|
1314
|
+
watch(() => props2.modelValue, () => {
|
|
1315
|
+
if (sketchValueUpdating.value)
|
|
1316
|
+
return;
|
|
1317
|
+
uSketchValue();
|
|
1318
|
+
}, {
|
|
1319
|
+
immediate: true
|
|
1320
|
+
});
|
|
1314
1321
|
const handleUpdateSketchValue = (e) => {
|
|
1315
1322
|
sketchValue.value = e;
|
|
1316
1323
|
if (props2.skipSave) {
|
|
@@ -1350,7 +1357,7 @@ var _sfc_main = defineComponent({
|
|
|
1350
1357
|
return;
|
|
1351
1358
|
toGeojson(e.raw).then((res) => {
|
|
1352
1359
|
emit("update:modelValue", res);
|
|
1353
|
-
}).then(
|
|
1360
|
+
}).then(() => {
|
|
1354
1361
|
ElMessage.success("\u4E0A\u4F20\u6210\u529F");
|
|
1355
1362
|
}).then(async () => {
|
|
1356
1363
|
var _a;
|
|
@@ -1365,6 +1372,7 @@ var _sfc_main = defineComponent({
|
|
|
1365
1372
|
dialogShow.value = true;
|
|
1366
1373
|
}
|
|
1367
1374
|
function u() {
|
|
1375
|
+
sketchValueUpdating.value = true;
|
|
1368
1376
|
const features = sketchValue.value.map((item) => {
|
|
1369
1377
|
return arcgisToGeoJSON(item);
|
|
1370
1378
|
});
|
|
@@ -1372,6 +1380,9 @@ var _sfc_main = defineComponent({
|
|
|
1372
1380
|
type: "FeatureCollection",
|
|
1373
1381
|
features
|
|
1374
1382
|
});
|
|
1383
|
+
nextTick(() => {
|
|
1384
|
+
sketchValueUpdating.value = false;
|
|
1385
|
+
});
|
|
1375
1386
|
}
|
|
1376
1387
|
function uSketchValue() {
|
|
1377
1388
|
const esriData = geojsonToArcGIS(props2.modelValue);
|