@vunk/form 1.1.24 → 1.1.26

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,6 +1,5 @@
1
- import { openBlock, createElementBlock, createElementVNode, defineComponent, resolveComponent, createBlock, withCtx, createVNode, createCommentVNode, provide, renderSlot, shallowRef, computed, onMounted, ref, mergeProps, toHandlers, withDirectives, vShow } from 'vue';
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
- import { EMPTY_FEATURE_COLLECTION } from '@vumap/core/shared/static';
4
3
  import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
5
4
  import { ElButton, ElIcon, ElButtonGroup, ElUpload, ElMessage } from 'element-plus';
6
5
  import { VaTdtBasemap, VaMapView, VaSketch, VaGraphicsLayer } from '@vuesri/core';
@@ -9,6 +8,39 @@ import SceneView from '@arcgis/core/views/SceneView';
9
8
  import { VkAsyncTeleport } from '@vunk/core';
10
9
  import Graphic from '@arcgis/core/Graphic';
11
10
  import { useComputedReadonly } from '@vunk/form/composables';
11
+ import { Deferred } from '@vunk/core/shared/utils-promise';
12
+
13
+ var EDIT_TYPE = /* @__PURE__ */ ((EDIT_TYPE2) => {
14
+ EDIT_TYPE2["POINT"] = "point";
15
+ EDIT_TYPE2["POLYGON"] = "polygon";
16
+ EDIT_TYPE2["LINE_STRING"] = "line_string";
17
+ return EDIT_TYPE2;
18
+ })(EDIT_TYPE || {});
19
+ const EDIT_TYPE_OPTIONS = [
20
+ {
21
+ label: "\u70B9",
22
+ value: "point" /* POINT */,
23
+ availableCreatureTools: ["point"]
24
+ },
25
+ {
26
+ label: "\u7EBF",
27
+ value: "line_string" /* LINE_STRING */,
28
+ availableCreatureTools: ["polyline"]
29
+ },
30
+ {
31
+ label: "\u9762",
32
+ value: "polygon" /* POLYGON */,
33
+ availableCreatureTools: ["polygon", "circle", "rectangle"]
34
+ }
35
+ ];
36
+ const EDIT_TYPE_REFLECT = EDIT_TYPE_OPTIONS.reduce((acc, cur) => {
37
+ acc[cur.value] = cur;
38
+ return acc;
39
+ }, {});
40
+ const EMPTY_FEATURE_COLLECTION = {
41
+ type: "FeatureCollection",
42
+ features: []
43
+ };
12
44
 
13
45
  var __defProp = Object.defineProperty;
14
46
  var __defProps = Object.defineProperties;
@@ -87,42 +119,19 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
87
119
  dialogEditTitle: {
88
120
  type: String,
89
121
  default: "\u7ED8\u5236\u56FE\u6591"
122
+ },
123
+ flying: {
124
+ type: Boolean,
125
+ default: false
90
126
  }
91
127
  });
92
128
  bindPropsFactory(props);
93
129
  const emits = __spreadProps(__spreadValues({}, _VkfInputCtx.emits), {
94
- "update:modelValue": (e) => e
130
+ "update:modelValue": (e) => e,
131
+ "update:flying": (e) => e
95
132
  });
96
133
  onEmitsFactory(emits);
97
134
 
98
- var EDIT_TYPE = /* @__PURE__ */ ((EDIT_TYPE2) => {
99
- EDIT_TYPE2["POINT"] = "point";
100
- EDIT_TYPE2["POLYGON"] = "polygon";
101
- EDIT_TYPE2["LINE_STRING"] = "line_string";
102
- return EDIT_TYPE2;
103
- })(EDIT_TYPE || {});
104
- const EDIT_TYPE_OPTIONS = [
105
- {
106
- label: "\u70B9",
107
- value: "point" /* POINT */,
108
- availableCreatureTools: ["point"]
109
- },
110
- {
111
- label: "\u7EBF",
112
- value: "line_string" /* LINE_STRING */,
113
- availableCreatureTools: ["polyline"]
114
- },
115
- {
116
- label: "\u9762",
117
- value: "polygon" /* POLYGON */,
118
- availableCreatureTools: ["polygon", "circle", "rectangle"]
119
- }
120
- ];
121
- const EDIT_TYPE_REFLECT = EDIT_TYPE_OPTIONS.reduce((acc, cur) => {
122
- acc[cur.value] = cur;
123
- return acc;
124
- }, {});
125
-
126
135
  /*! Element Plus Icons Vue v2.1.0 */
127
136
 
128
137
  // unplugin-vue:/plugin-vue/export-helper
@@ -1296,9 +1305,11 @@ var _sfc_main = defineComponent({
1296
1305
  const container = (_a = sketchRef.value) == null ? void 0 : _a.container;
1297
1306
  return container == null ? void 0 : container.querySelector(".esri-sketch__panel");
1298
1307
  });
1308
+ const viewDef = new Deferred();
1299
1309
  const sketchLoad = async (e) => {
1300
1310
  await e.sketch.when();
1301
1311
  sketchRef.value = e.sketch;
1312
+ viewDef.resolve(sketchRef.value.view);
1302
1313
  };
1303
1314
  const availableCreatureTools = computed(() => {
1304
1315
  if (Array.isArray(props2.editTypes)) {
@@ -1309,8 +1320,18 @@ var _sfc_main = defineComponent({
1309
1320
  return EDIT_TYPE_REFLECT[props2.editTypes].availableCreatureTools;
1310
1321
  }
1311
1322
  });
1323
+ const sketchValueUpdating = ref(false);
1312
1324
  const sketchValue = shallowRef([]);
1313
- uSketchValue();
1325
+ watch(() => props2.modelValue, (v, ov) => {
1326
+ if (sketchValueUpdating.value)
1327
+ return;
1328
+ uSketchValue();
1329
+ if (!(ov == null ? void 0 : ov.features.length)) {
1330
+ fly();
1331
+ }
1332
+ }, {
1333
+ immediate: true
1334
+ });
1314
1335
  const handleUpdateSketchValue = (e) => {
1315
1336
  sketchValue.value = e;
1316
1337
  if (props2.skipSave) {
@@ -1350,21 +1371,15 @@ var _sfc_main = defineComponent({
1350
1371
  return;
1351
1372
  toGeojson(e.raw).then((res) => {
1352
1373
  emit("update:modelValue", res);
1353
- }).then(uSketchValue).then(() => {
1374
+ }).then(() => {
1354
1375
  ElMessage.success("\u4E0A\u4F20\u6210\u529F");
1355
- }).then(async () => {
1356
- var _a;
1357
- const view = (_a = sketchRef.value) == null ? void 0 : _a.view;
1358
- if (!view)
1359
- return;
1360
- await view.when();
1361
- view.goTo(sketchValue.value);
1362
- });
1376
+ }).then(fly);
1363
1377
  }
1364
1378
  function onEdit() {
1365
1379
  dialogShow.value = true;
1366
1380
  }
1367
1381
  function u() {
1382
+ sketchValueUpdating.value = true;
1368
1383
  const features = sketchValue.value.map((item) => {
1369
1384
  return arcgisToGeoJSON(item);
1370
1385
  });
@@ -1372,6 +1387,9 @@ var _sfc_main = defineComponent({
1372
1387
  type: "FeatureCollection",
1373
1388
  features
1374
1389
  });
1390
+ nextTick(() => {
1391
+ sketchValueUpdating.value = false;
1392
+ });
1375
1393
  }
1376
1394
  function uSketchValue() {
1377
1395
  const esriData = geojsonToArcGIS(props2.modelValue);
@@ -1391,6 +1409,16 @@ var _sfc_main = defineComponent({
1391
1409
  });
1392
1410
  sketchValue.value = graphics;
1393
1411
  }
1412
+ async function fly() {
1413
+ const view = await viewDef.promise;
1414
+ if (!view)
1415
+ return;
1416
+ emit("update:flying", true);
1417
+ await view.when();
1418
+ view.goTo(sketchValue.value).finally(() => {
1419
+ emit("update:flying", false);
1420
+ });
1421
+ }
1394
1422
  return {
1395
1423
  inputBindProps,
1396
1424
  inputOnEmits,
@@ -1523,4 +1551,4 @@ VkfEsriInputGeojson.install = (app) => {
1523
1551
  app.component(VkfEsriInputGeojson.name, VkfEsriInputGeojson);
1524
1552
  };
1525
1553
 
1526
- export { EDIT_TYPE, EDIT_TYPE_OPTIONS, EDIT_TYPE_REFLECT, VkfEsriInputGeojson, types as __VkfEsriInputGeojson, VkfEsriInputGeojson as default };
1554
+ export { EDIT_TYPE, EDIT_TYPE_OPTIONS, EDIT_TYPE_REFLECT, EMPTY_FEATURE_COLLECTION, VkfEsriInputGeojson, types as __VkfEsriInputGeojson, VkfEsriInputGeojson as default };
@@ -6,3 +6,7 @@ export declare enum EDIT_TYPE {
6
6
  }
7
7
  export declare const EDIT_TYPE_OPTIONS: EditTypeMedia[];
8
8
  export declare const EDIT_TYPE_REFLECT: Record<EDIT_TYPE, EditTypeMedia>;
9
+ export declare const EMPTY_FEATURE_COLLECTION: {
10
+ type: string;
11
+ features: never[];
12
+ };
@@ -25,5 +25,9 @@ const EDIT_TYPE_REFLECT = EDIT_TYPE_OPTIONS.reduce((acc, cur) => {
25
25
  acc[cur.value] = cur;
26
26
  return acc;
27
27
  }, {});
28
+ const EMPTY_FEATURE_COLLECTION = {
29
+ type: "FeatureCollection",
30
+ features: []
31
+ };
28
32
 
29
- export { EDIT_TYPE, EDIT_TYPE_OPTIONS, EDIT_TYPE_REFLECT };
33
+ export { EDIT_TYPE, EDIT_TYPE_OPTIONS, EDIT_TYPE_REFLECT, EMPTY_FEATURE_COLLECTION };
@@ -30,7 +30,10 @@ export declare const props: {
30
30
  viewModelActivePointSymbol: null;
31
31
  modelValue: {
32
32
  type: PropType<FeatureCollection<Geometry, any>>;
33
- default: () => FeatureCollection<Geometry, import("geojson").GeoJsonProperties>;
33
+ default: () => {
34
+ type: string;
35
+ features: never[];
36
+ };
34
37
  };
35
38
  multiple: {
36
39
  type: BooleanConstructor;
@@ -60,6 +63,10 @@ export declare const props: {
60
63
  type: StringConstructor;
61
64
  default: string;
62
65
  };
66
+ flying: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
63
70
  maxlength: {
64
71
  type: NumberConstructor;
65
72
  required: boolean;
@@ -182,9 +189,10 @@ export declare const props: {
182
189
  validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
183
190
  inputStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => import("element-plus/es/utils").Mutable<{}>, boolean>;
184
191
  };
185
- export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"form", keyof T2> | Extract<"clearable", keyof T2> | Extract<"showPassword", keyof T2> | Extract<"showWordLimit", keyof T2> | Extract<"suffixIcon", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"containerRole", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"inputStyle", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"inputSlots", keyof T2> | Extract<"rows", keyof T2> | Extract<"multiple", keyof T2> | Extract<"editTypes", keyof T2> | Extract<"showMap", keyof T2> | Extract<"dialogEdit", keyof T2> | Extract<"dialogEditFullscreen", keyof T2> | Extract<"dialogEditTitle", keyof T2> | Extract<"mapTo", keyof T2> | Extract<"viewModelActiveFillSymbol", keyof T2> | Extract<"view", keyof T2> | Extract<"viewModelActiveLineSymbol", keyof T2> | Extract<"viewModelActivePointSymbol", keyof T2> | Extract<"skipSave", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"type", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"id", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"resize", keyof T2>, KE> | Exclude<Extract<"autosize", keyof T2>, KE> | Exclude<Extract<"autocomplete", keyof T2>, KE> | Exclude<Extract<"formatter", keyof T2>, KE> | Exclude<Extract<"parser", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"form", keyof T2>, KE> | Exclude<Extract<"clearable", keyof T2>, KE> | Exclude<Extract<"showPassword", keyof T2>, KE> | Exclude<Extract<"showWordLimit", keyof T2>, KE> | Exclude<Extract<"suffixIcon", keyof T2>, KE> | Exclude<Extract<"prefixIcon", keyof T2>, KE> | Exclude<Extract<"containerRole", keyof T2>, KE> | Exclude<Extract<"tabindex", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"inputStyle", keyof T2>, KE> | Exclude<Extract<"maxlength", keyof T2>, KE> | Exclude<Extract<"minlength", keyof T2>, KE> | Exclude<Extract<"inputSlots", keyof T2>, KE> | Exclude<Extract<"rows", keyof T2>, KE> | Exclude<Extract<"multiple", keyof T2>, KE> | Exclude<Extract<"editTypes", keyof T2>, KE> | Exclude<Extract<"showMap", keyof T2>, KE> | Exclude<Extract<"dialogEdit", keyof T2>, KE> | Exclude<Extract<"dialogEditFullscreen", keyof T2>, KE> | Exclude<Extract<"dialogEditTitle", keyof T2>, KE> | Exclude<Extract<"mapTo", keyof T2>, KE> | Exclude<Extract<"viewModelActiveFillSymbol", keyof T2>, KE> | Exclude<Extract<"view", keyof T2>, KE> | Exclude<Extract<"viewModelActiveLineSymbol", keyof T2>, KE> | Exclude<Extract<"viewModelActivePointSymbol", keyof T2>, KE> | Exclude<Extract<"skipSave", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"form", keyof T2> | Extract<"clearable", keyof T2> | Extract<"showPassword", keyof T2> | Extract<"showWordLimit", keyof T2> | Extract<"suffixIcon", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"containerRole", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"inputStyle", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"inputSlots", keyof T2> | Extract<"rows", keyof T2> | Extract<"multiple", keyof T2> | Extract<"editTypes", keyof T2> | Extract<"showMap", keyof T2> | Extract<"dialogEdit", keyof T2> | Extract<"dialogEditFullscreen", keyof T2> | Extract<"dialogEditTitle", keyof T2> | Extract<"mapTo", keyof T2> | Extract<"viewModelActiveFillSymbol", keyof T2> | Extract<"view", keyof T2> | Extract<"viewModelActiveLineSymbol", keyof T2> | Extract<"viewModelActivePointSymbol", keyof T2> | Extract<"skipSave", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"form", keyof T2> | Extract<"clearable", keyof T2> | Extract<"showPassword", keyof T2> | Extract<"showWordLimit", keyof T2> | Extract<"suffixIcon", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"containerRole", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"inputStyle", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"inputSlots", keyof T2> | Extract<"rows", keyof T2> | Extract<"multiple", keyof T2> | Extract<"editTypes", keyof T2> | Extract<"showMap", keyof T2> | Extract<"dialogEdit", keyof T2> | Extract<"dialogEditFullscreen", keyof T2> | Extract<"dialogEditTitle", keyof T2> | Extract<"mapTo", keyof T2> | Extract<"viewModelActiveFillSymbol", keyof T2> | Extract<"view", keyof T2> | Extract<"viewModelActiveLineSymbol", keyof T2> | Extract<"viewModelActivePointSymbol", keyof T2> | Extract<"skipSave", keyof T2>]: T2[k]; }[P]; }>;
192
+ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"form", keyof T2> | Extract<"clearable", keyof T2> | Extract<"showPassword", keyof T2> | Extract<"showWordLimit", keyof T2> | Extract<"suffixIcon", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"containerRole", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"inputStyle", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"inputSlots", keyof T2> | Extract<"rows", keyof T2> | Extract<"multiple", keyof T2> | Extract<"editTypes", keyof T2> | Extract<"showMap", keyof T2> | Extract<"dialogEdit", keyof T2> | Extract<"dialogEditFullscreen", keyof T2> | Extract<"dialogEditTitle", keyof T2> | Extract<"mapTo", keyof T2> | Extract<"viewModelActiveFillSymbol", keyof T2> | Extract<"view", keyof T2> | Extract<"viewModelActiveLineSymbol", keyof T2> | Extract<"viewModelActivePointSymbol", keyof T2> | Extract<"skipSave", keyof T2> | Extract<"flying", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"type", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"id", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"resize", keyof T2>, KE> | Exclude<Extract<"autosize", keyof T2>, KE> | Exclude<Extract<"autocomplete", keyof T2>, KE> | Exclude<Extract<"formatter", keyof T2>, KE> | Exclude<Extract<"parser", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"form", keyof T2>, KE> | Exclude<Extract<"clearable", keyof T2>, KE> | Exclude<Extract<"showPassword", keyof T2>, KE> | Exclude<Extract<"showWordLimit", keyof T2>, KE> | Exclude<Extract<"suffixIcon", keyof T2>, KE> | Exclude<Extract<"prefixIcon", keyof T2>, KE> | Exclude<Extract<"containerRole", keyof T2>, KE> | Exclude<Extract<"tabindex", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"inputStyle", keyof T2>, KE> | Exclude<Extract<"maxlength", keyof T2>, KE> | Exclude<Extract<"minlength", keyof T2>, KE> | Exclude<Extract<"inputSlots", keyof T2>, KE> | Exclude<Extract<"rows", keyof T2>, KE> | Exclude<Extract<"multiple", keyof T2>, KE> | Exclude<Extract<"editTypes", keyof T2>, KE> | Exclude<Extract<"showMap", keyof T2>, KE> | Exclude<Extract<"dialogEdit", keyof T2>, KE> | Exclude<Extract<"dialogEditFullscreen", keyof T2>, KE> | Exclude<Extract<"dialogEditTitle", keyof T2>, KE> | Exclude<Extract<"mapTo", keyof T2>, KE> | Exclude<Extract<"viewModelActiveFillSymbol", keyof T2>, KE> | Exclude<Extract<"view", keyof T2>, KE> | Exclude<Extract<"viewModelActiveLineSymbol", keyof T2>, KE> | Exclude<Extract<"viewModelActivePointSymbol", keyof T2>, KE> | Exclude<Extract<"skipSave", keyof T2>, KE> | Exclude<Extract<"flying", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"form", keyof T2> | Extract<"clearable", keyof T2> | Extract<"showPassword", keyof T2> | Extract<"showWordLimit", keyof T2> | Extract<"suffixIcon", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"containerRole", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"inputStyle", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"inputSlots", keyof T2> | Extract<"rows", keyof T2> | Extract<"multiple", keyof T2> | Extract<"editTypes", keyof T2> | Extract<"showMap", keyof T2> | Extract<"dialogEdit", keyof T2> | Extract<"dialogEditFullscreen", keyof T2> | Extract<"dialogEditTitle", keyof T2> | Extract<"mapTo", keyof T2> | Extract<"viewModelActiveFillSymbol", keyof T2> | Extract<"view", keyof T2> | Extract<"viewModelActiveLineSymbol", keyof T2> | Extract<"viewModelActivePointSymbol", keyof T2> | Extract<"skipSave", keyof T2> | Extract<"flying", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"form", keyof T2> | Extract<"clearable", keyof T2> | Extract<"showPassword", keyof T2> | Extract<"showWordLimit", keyof T2> | Extract<"suffixIcon", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"containerRole", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"inputStyle", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"inputSlots", keyof T2> | Extract<"rows", keyof T2> | Extract<"multiple", keyof T2> | Extract<"editTypes", keyof T2> | Extract<"showMap", keyof T2> | Extract<"dialogEdit", keyof T2> | Extract<"dialogEditFullscreen", keyof T2> | Extract<"dialogEditTitle", keyof T2> | Extract<"mapTo", keyof T2> | Extract<"viewModelActiveFillSymbol", keyof T2> | Extract<"view", keyof T2> | Extract<"viewModelActiveLineSymbol", keyof T2> | Extract<"viewModelActivePointSymbol", keyof T2> | Extract<"skipSave", keyof T2> | Extract<"flying", keyof T2>]: T2[k]; }[P]; }>;
186
193
  export declare const emits: {
187
194
  'update:modelValue': (e: FeatureCollection) => FeatureCollection<Geometry, import("geojson").GeoJsonProperties>;
195
+ 'update:flying': (e: boolean) => boolean;
188
196
  input: (value: string) => boolean;
189
197
  change: (value: string) => boolean;
190
198
  focus: (evt: FocusEvent) => boolean;
@@ -197,8 +205,9 @@ export declare const emits: {
197
205
  compositionupdate: (evt: CompositionEvent) => boolean;
198
206
  compositionend: (evt: CompositionEvent) => boolean;
199
207
  };
200
- export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("update:modelValue" | "input" | "change" | "focus" | "blur" | "clear" | "mouseleave" | "mouseenter" | "keydown" | "compositionstart" | "compositionupdate" | "compositionend")[] | undefined>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue", KE> | Exclude<"input", KE> | Exclude<"change", KE> | Exclude<"focus", KE> | Exclude<"blur", KE> | Exclude<"clear", KE> | Exclude<"mouseleave", KE> | Exclude<"mouseenter", KE> | Exclude<"keydown", KE> | Exclude<"compositionstart", KE> | Exclude<"compositionupdate", KE> | Exclude<"compositionend", KE> : "update:modelValue" | "input" | "change" | "focus" | "blur" | "clear" | "mouseleave" | "mouseenter" | "keydown" | "compositionstart" | "compositionupdate" | "compositionend"]: {
208
+ export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("update:modelValue" | "input" | "change" | "focus" | "blur" | "clear" | "mouseleave" | "mouseenter" | "keydown" | "compositionstart" | "compositionupdate" | "compositionend" | "update:flying")[] | undefined>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue", KE> | Exclude<"input", KE> | Exclude<"change", KE> | Exclude<"focus", KE> | Exclude<"blur", KE> | Exclude<"clear", KE> | Exclude<"mouseleave", KE> | Exclude<"mouseenter", KE> | Exclude<"keydown", KE> | Exclude<"compositionstart", KE> | Exclude<"compositionupdate", KE> | Exclude<"compositionend", KE> | Exclude<"update:flying", KE> : "update:modelValue" | "input" | "change" | "focus" | "blur" | "clear" | "mouseleave" | "mouseenter" | "keydown" | "compositionstart" | "compositionupdate" | "compositionend" | "update:flying"]: {
201
209
  'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
210
+ 'update:flying': (...e: import("@vunk/core").RestParameters<T2>) => void;
202
211
  input: (...e: import("@vunk/core").RestParameters<T2>) => void;
203
212
  change: (...e: import("@vunk/core").RestParameters<T2>) => void;
204
213
  focus: (...e: import("@vunk/core").RestParameters<T2>) => void;
@@ -1,7 +1,32 @@
1
1
  import { _VkfInputCtx } from '@vunk/form/components/input';
2
- import { EMPTY_FEATURE_COLLECTION } from '@vumap/core/shared/static';
3
2
  import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
4
3
 
4
+ const EDIT_TYPE_OPTIONS = [
5
+ {
6
+ label: "\u70B9",
7
+ value: "point" /* POINT */,
8
+ availableCreatureTools: ["point"]
9
+ },
10
+ {
11
+ label: "\u7EBF",
12
+ value: "line_string" /* LINE_STRING */,
13
+ availableCreatureTools: ["polyline"]
14
+ },
15
+ {
16
+ label: "\u9762",
17
+ value: "polygon" /* POLYGON */,
18
+ availableCreatureTools: ["polygon", "circle", "rectangle"]
19
+ }
20
+ ];
21
+ EDIT_TYPE_OPTIONS.reduce((acc, cur) => {
22
+ acc[cur.value] = cur;
23
+ return acc;
24
+ }, {});
25
+ const EMPTY_FEATURE_COLLECTION = {
26
+ type: "FeatureCollection",
27
+ features: []
28
+ };
29
+
5
30
  var __defProp = Object.defineProperty;
6
31
  var __defProps = Object.defineProperties;
7
32
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -79,11 +104,16 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
79
104
  dialogEditTitle: {
80
105
  type: String,
81
106
  default: "\u7ED8\u5236\u56FE\u6591"
107
+ },
108
+ flying: {
109
+ type: Boolean,
110
+ default: false
82
111
  }
83
112
  });
84
113
  const createBindProps = bindPropsFactory(props);
85
114
  const emits = __spreadProps(__spreadValues({}, _VkfInputCtx.emits), {
86
- "update:modelValue": (e) => e
115
+ "update:modelValue": (e) => e,
116
+ "update:flying": (e) => e
87
117
  });
88
118
  const createOnEmits = onEmitsFactory(emits);
89
119
 
@@ -30,7 +30,10 @@ declare const _default: import("vue").DefineComponent<{
30
30
  viewModelActivePointSymbol: null;
31
31
  modelValue: {
32
32
  type: import("vue").PropType<import("geojson").FeatureCollection<import("geojson").Geometry, any>>;
33
- default: () => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
33
+ default: () => {
34
+ type: string;
35
+ features: never[];
36
+ };
34
37
  };
35
38
  multiple: {
36
39
  type: BooleanConstructor;
@@ -60,6 +63,10 @@ declare const _default: import("vue").DefineComponent<{
60
63
  type: StringConstructor;
61
64
  default: string;
62
65
  };
66
+ flying: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
63
70
  maxlength: {
64
71
  type: NumberConstructor;
65
72
  required: boolean;
@@ -151,7 +158,9 @@ declare const _default: import("vue").DefineComponent<{
151
158
  __epPropKey: true;
152
159
  };
153
160
  placeholder: {
154
- readonly type: import("vue").PropType<string>;
161
+ readonly type: import("vue").PropType<string>; /**
162
+ * 初始化
163
+ */
155
164
  readonly required: false;
156
165
  readonly validator: ((val: unknown) => boolean) | undefined;
157
166
  __epPropKey: true;
@@ -223,17 +232,17 @@ declare const _default: import("vue").DefineComponent<{
223
232
  rows: number | undefined;
224
233
  }>;
225
234
  inputOnEmits: {
226
- input: (evt: CompositionEvent) => void;
227
- change: (evt: CompositionEvent) => void;
228
- focus: (evt: CompositionEvent) => void;
229
- blur: (evt: CompositionEvent) => void;
230
- clear: (evt: CompositionEvent) => void;
231
- mouseleave: (evt: CompositionEvent) => void;
232
- mouseenter: (evt: CompositionEvent) => void;
233
- keydown: (evt: CompositionEvent) => void;
234
- compositionstart: (evt: CompositionEvent) => void;
235
- compositionupdate: (evt: CompositionEvent) => void;
236
- compositionend: (evt: CompositionEvent) => void;
235
+ input: (e: boolean) => void;
236
+ change: (e: boolean) => void;
237
+ focus: (e: boolean) => void;
238
+ blur: (e: boolean) => void;
239
+ clear: (e: boolean) => void;
240
+ mouseleave: (e: boolean) => void;
241
+ mouseenter: (e: boolean) => void;
242
+ keydown: (e: boolean) => void;
243
+ compositionstart: (e: boolean) => void;
244
+ compositionupdate: (e: boolean) => void;
245
+ compositionend: (e: boolean) => void;
237
246
  };
238
247
  append: () => JSX.Element;
239
248
  availableCreatureTools: import("vue").ComputedRef<("circle" | "point" | "polygon" | "polyline" | "rectangle")[]>;
@@ -252,6 +261,7 @@ declare const _default: import("vue").DefineComponent<{
252
261
  readonly: import("vue").ComputedRef<boolean>;
253
262
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
254
263
  'update:modelValue': (e: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>) => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
264
+ 'update:flying': (e: boolean) => boolean;
255
265
  input: (value: string) => boolean;
256
266
  change: (value: string) => boolean;
257
267
  focus: (evt: FocusEvent) => boolean;
@@ -292,7 +302,10 @@ declare const _default: import("vue").DefineComponent<{
292
302
  viewModelActivePointSymbol: null;
293
303
  modelValue: {
294
304
  type: import("vue").PropType<import("geojson").FeatureCollection<import("geojson").Geometry, any>>;
295
- default: () => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
305
+ default: () => {
306
+ type: string;
307
+ features: never[];
308
+ };
296
309
  };
297
310
  multiple: {
298
311
  type: BooleanConstructor;
@@ -322,6 +335,10 @@ declare const _default: import("vue").DefineComponent<{
322
335
  type: StringConstructor;
323
336
  default: string;
324
337
  };
338
+ flying: {
339
+ type: BooleanConstructor;
340
+ default: boolean;
341
+ };
325
342
  maxlength: {
326
343
  type: NumberConstructor;
327
344
  required: boolean;
@@ -413,7 +430,9 @@ declare const _default: import("vue").DefineComponent<{
413
430
  __epPropKey: true;
414
431
  };
415
432
  placeholder: {
416
- readonly type: import("vue").PropType<string>;
433
+ readonly type: import("vue").PropType<string>; /**
434
+ * 初始化
435
+ */
417
436
  readonly required: false;
418
437
  readonly validator: ((val: unknown) => boolean) | undefined;
419
438
  __epPropKey: true;
@@ -456,6 +475,7 @@ declare const _default: import("vue").DefineComponent<{
456
475
  onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
457
476
  onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
458
477
  onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
478
+ "onUpdate:flying"?: ((e: boolean) => any) | undefined;
459
479
  }, {
460
480
  required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
461
481
  type: string;
@@ -490,5 +510,6 @@ declare const _default: import("vue").DefineComponent<{
490
510
  mapTo: string | import("vue").RendererElement;
491
511
  viewModelActiveFillSymbol: any;
492
512
  skipSave: boolean;
513
+ flying: boolean;
493
514
  }>;
494
515
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "1.1.24",
3
+ "version": "1.1.26",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {