@vunk/form 1.1.25 → 1.1.27
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.
- package/components/button/src/ctx.d.ts +2 -2
- package/components/button/src/index.vue.d.ts +11 -11
- package/components/cascader/src/ctx.d.ts +2 -2
- package/components/cascader/src/index.vue.d.ts +27 -27
- package/components/checkbox/src/ctx.d.ts +2 -2
- package/components/checkbox/src/index.vue.d.ts +10 -10
- package/components/color-picker/src/ctx.d.ts +1 -1
- package/components/color-picker/src/index.vue.d.ts +10 -10
- package/components/date-picker/src/ctx.d.ts +1 -1
- package/components/date-picker/src/index.vue.d.ts +16 -16
- package/components/esri-input-geojson/index.js +115 -44
- package/components/esri-input-geojson/src/append.vue.d.ts +2 -0
- package/components/esri-input-geojson/src/const.d.ts +4 -0
- package/components/esri-input-geojson/src/const.js +5 -1
- package/components/esri-input-geojson/src/ctx.d.ts +13 -4
- package/components/esri-input-geojson/src/ctx.js +32 -2
- package/components/esri-input-geojson/src/index.vue.d.ts +49 -28
- package/components/form/src/ctx.d.ts +2 -2
- package/components/form/src/index.vue.d.ts +6 -6
- package/components/form-item/src/ctx.d.ts +1 -1
- package/components/form-item/src/index.vue.d.ts +3 -3
- package/components/geoinput/src/ctx.d.ts +1 -1
- package/components/geoinput/src/index.vue.d.ts +23 -23
- package/components/geoinput-read/src/core.vue.d.ts +14 -14
- package/components/geoinput-read/src/ctx.d.ts +3 -3
- package/components/geoinput-read/src/index.vue.d.ts +15 -15
- package/components/geoinput-update/src/ctx.d.ts +3 -3
- package/components/geoinput-update/src/index.vue.d.ts +14 -14
- package/components/input/src/ctx.d.ts +3 -3
- package/components/input/src/index.vue.d.ts +14 -14
- package/components/input-link/src/ctx.d.ts +1 -1
- package/components/input-link/src/index.vue.d.ts +16 -16
- package/components/input-number/src/ctx.d.ts +3 -3
- package/components/input-number/src/index.vue.d.ts +15 -15
- package/components/radio/src/ctx.d.ts +1 -1
- package/components/radio/src/index.vue.d.ts +9 -9
- package/components/select/src/ctx.d.ts +4 -4
- package/components/select/src/index.vue.d.ts +48 -48
- package/components/slider/src/ctx.d.ts +1 -1
- package/components/slider/src/index.vue.d.ts +10 -10
- package/components/switch/src/ctx.d.ts +1 -1
- package/components/switch/src/index.vue.d.ts +7 -7
- package/components/upload/src/ctx.d.ts +2 -2
- package/components/upload/src/index.vue.d.ts +4 -4
- package/components/upload-plus/src/ctx.d.ts +1 -1
- package/components/upload-plus/src/index.vue.d.ts +4 -4
- package/components/van-cascader/src/ctx.d.ts +1 -1
- package/components/van-cascader/src/index.vue.d.ts +18 -18
- package/package.json +1 -1
- package/shared/element-plus/ctx.d.ts +12 -12
|
@@ -1,6 +1,5 @@
|
|
|
1
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": null
|
|
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
|
|
@@ -191,6 +200,40 @@ function _sfc_render94(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
191
200
|
}
|
|
192
201
|
var edit_default = /* @__PURE__ */ export_helper_default(edit_vue_vue_type_script_lang_default, [["render", _sfc_render94], ["__file", "edit.vue"]]);
|
|
193
202
|
|
|
203
|
+
// unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/map-location.vue?vue&type=script&lang.ts
|
|
204
|
+
var map_location_vue_vue_type_script_lang_default = {
|
|
205
|
+
name: "MapLocation"
|
|
206
|
+
};
|
|
207
|
+
var _hoisted_1160 = {
|
|
208
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
209
|
+
viewBox: "0 0 1024 1024"
|
|
210
|
+
}, _hoisted_2160 = /* @__PURE__ */ createElementVNode(
|
|
211
|
+
"path",
|
|
212
|
+
{
|
|
213
|
+
fill: "currentColor",
|
|
214
|
+
d: "M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416zM512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544z"
|
|
215
|
+
},
|
|
216
|
+
null,
|
|
217
|
+
-1
|
|
218
|
+
/* HOISTED */
|
|
219
|
+
), _hoisted_3159 = /* @__PURE__ */ createElementVNode(
|
|
220
|
+
"path",
|
|
221
|
+
{
|
|
222
|
+
fill: "currentColor",
|
|
223
|
+
d: "M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128zm0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256zm345.6 192L960 960H672v-64H352v64H64l102.4-256h691.2zm-68.928 0H235.328l-76.8 192h706.944l-76.8-192z"
|
|
224
|
+
},
|
|
225
|
+
null,
|
|
226
|
+
-1
|
|
227
|
+
/* HOISTED */
|
|
228
|
+
), _hoisted_444 = [
|
|
229
|
+
_hoisted_2160,
|
|
230
|
+
_hoisted_3159
|
|
231
|
+
];
|
|
232
|
+
function _sfc_render160(_ctx, _cache, $props, $setup, $data, $options) {
|
|
233
|
+
return openBlock(), createElementBlock("svg", _hoisted_1160, _hoisted_444);
|
|
234
|
+
}
|
|
235
|
+
var map_location_default = /* @__PURE__ */ export_helper_default(map_location_vue_vue_type_script_lang_default, [["render", _sfc_render160], ["__file", "map-location.vue"]]);
|
|
236
|
+
|
|
194
237
|
// unplugin-vue:/home/runner/work/element-plus-icons/element-plus-icons/packages/vue/src/components/upload.vue?vue&type=script&lang.ts
|
|
195
238
|
var upload_vue_vue_type_script_lang_default = {
|
|
196
239
|
name: "Upload"
|
|
@@ -230,7 +273,8 @@ const _sfc_main$2 = defineComponent({
|
|
|
230
273
|
ElButtonGroup,
|
|
231
274
|
Upload: upload_default,
|
|
232
275
|
Edit: edit_default,
|
|
233
|
-
ElUpload
|
|
276
|
+
ElUpload,
|
|
277
|
+
MapLocation: map_location_default
|
|
234
278
|
},
|
|
235
279
|
props: {
|
|
236
280
|
disabled: Boolean,
|
|
@@ -242,7 +286,8 @@ const _sfc_main$2 = defineComponent({
|
|
|
242
286
|
},
|
|
243
287
|
emits: {
|
|
244
288
|
upload: (e) => e,
|
|
245
|
-
edit: null
|
|
289
|
+
edit: null,
|
|
290
|
+
fly: null
|
|
246
291
|
},
|
|
247
292
|
methods: {
|
|
248
293
|
getFile(file) {
|
|
@@ -262,6 +307,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
262
307
|
const _component_ElUpload = resolveComponent("ElUpload");
|
|
263
308
|
const _component_Edit = resolveComponent("Edit");
|
|
264
309
|
const _component_ElButton = resolveComponent("ElButton");
|
|
310
|
+
const _component_MapLocation = resolveComponent("MapLocation");
|
|
265
311
|
const _component_ElButtonGroup = resolveComponent("ElButtonGroup");
|
|
266
312
|
return openBlock(), createBlock(_component_ElButtonGroup, null, {
|
|
267
313
|
default: withCtx(() => [
|
|
@@ -301,7 +347,20 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
301
347
|
}, 8, ["color"])
|
|
302
348
|
]),
|
|
303
349
|
_: 1
|
|
304
|
-
}, 8, ["disabled"])) : createCommentVNode("v-if", true)
|
|
350
|
+
}, 8, ["disabled"])) : createCommentVNode("v-if", true),
|
|
351
|
+
createVNode(_component_ElButton, {
|
|
352
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("fly"))
|
|
353
|
+
}, {
|
|
354
|
+
default: withCtx(() => [
|
|
355
|
+
createVNode(_component_ElIcon, { color: "var(--el-color-primary)" }, {
|
|
356
|
+
default: withCtx(() => [
|
|
357
|
+
createVNode(_component_MapLocation)
|
|
358
|
+
]),
|
|
359
|
+
_: 1
|
|
360
|
+
}, 8, ["color"])
|
|
361
|
+
]),
|
|
362
|
+
_: 1
|
|
363
|
+
})
|
|
305
364
|
]),
|
|
306
365
|
_: 1
|
|
307
366
|
});
|
|
@@ -1296,9 +1355,11 @@ var _sfc_main = defineComponent({
|
|
|
1296
1355
|
const container = (_a = sketchRef.value) == null ? void 0 : _a.container;
|
|
1297
1356
|
return container == null ? void 0 : container.querySelector(".esri-sketch__panel");
|
|
1298
1357
|
});
|
|
1358
|
+
const viewDef = new Deferred();
|
|
1299
1359
|
const sketchLoad = async (e) => {
|
|
1300
1360
|
await e.sketch.when();
|
|
1301
1361
|
sketchRef.value = e.sketch;
|
|
1362
|
+
viewDef.resolve(sketchRef.value.view);
|
|
1302
1363
|
};
|
|
1303
1364
|
const availableCreatureTools = computed(() => {
|
|
1304
1365
|
if (Array.isArray(props2.editTypes)) {
|
|
@@ -1311,10 +1372,13 @@ var _sfc_main = defineComponent({
|
|
|
1311
1372
|
});
|
|
1312
1373
|
const sketchValueUpdating = ref(false);
|
|
1313
1374
|
const sketchValue = shallowRef([]);
|
|
1314
|
-
watch(() => props2.modelValue, () => {
|
|
1375
|
+
watch(() => props2.modelValue, (v, ov) => {
|
|
1315
1376
|
if (sketchValueUpdating.value)
|
|
1316
1377
|
return;
|
|
1317
1378
|
uSketchValue();
|
|
1379
|
+
if (!(ov == null ? void 0 : ov.features.length)) {
|
|
1380
|
+
fly();
|
|
1381
|
+
}
|
|
1318
1382
|
}, {
|
|
1319
1383
|
immediate: true
|
|
1320
1384
|
});
|
|
@@ -1350,7 +1414,8 @@ var _sfc_main = defineComponent({
|
|
|
1350
1414
|
"upload": !readonly.value,
|
|
1351
1415
|
"disabled": props2.disabled,
|
|
1352
1416
|
"onUpload": onUpload,
|
|
1353
|
-
"onEdit": onEdit
|
|
1417
|
+
"onEdit": onEdit,
|
|
1418
|
+
"onFly": fly
|
|
1354
1419
|
}, null);
|
|
1355
1420
|
async function onUpload(e) {
|
|
1356
1421
|
if (!e.raw)
|
|
@@ -1359,14 +1424,7 @@ var _sfc_main = defineComponent({
|
|
|
1359
1424
|
emit("update:modelValue", res);
|
|
1360
1425
|
}).then(() => {
|
|
1361
1426
|
ElMessage.success("\u4E0A\u4F20\u6210\u529F");
|
|
1362
|
-
}).then(
|
|
1363
|
-
var _a;
|
|
1364
|
-
const view = (_a = sketchRef.value) == null ? void 0 : _a.view;
|
|
1365
|
-
if (!view)
|
|
1366
|
-
return;
|
|
1367
|
-
await view.when();
|
|
1368
|
-
view.goTo(sketchValue.value);
|
|
1369
|
-
});
|
|
1427
|
+
}).then(fly);
|
|
1370
1428
|
}
|
|
1371
1429
|
function onEdit() {
|
|
1372
1430
|
dialogShow.value = true;
|
|
@@ -1402,6 +1460,19 @@ var _sfc_main = defineComponent({
|
|
|
1402
1460
|
});
|
|
1403
1461
|
sketchValue.value = graphics;
|
|
1404
1462
|
}
|
|
1463
|
+
watch(() => props2.flying, (v) => {
|
|
1464
|
+
v && fly();
|
|
1465
|
+
});
|
|
1466
|
+
async function fly() {
|
|
1467
|
+
const view = await viewDef.promise;
|
|
1468
|
+
if (!view)
|
|
1469
|
+
return;
|
|
1470
|
+
emit("update:flying", true);
|
|
1471
|
+
await view.when();
|
|
1472
|
+
view.goTo(sketchValue.value).finally(() => {
|
|
1473
|
+
emit("update:flying", false);
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1405
1476
|
return {
|
|
1406
1477
|
inputBindProps,
|
|
1407
1478
|
inputOnEmits,
|
|
@@ -1534,4 +1605,4 @@ VkfEsriInputGeojson.install = (app) => {
|
|
|
1534
1605
|
app.component(VkfEsriInputGeojson.name, VkfEsriInputGeojson);
|
|
1535
1606
|
};
|
|
1536
1607
|
|
|
1537
|
-
export { EDIT_TYPE, EDIT_TYPE_OPTIONS, EDIT_TYPE_REFLECT, VkfEsriInputGeojson, types as __VkfEsriInputGeojson, VkfEsriInputGeojson as default };
|
|
1608
|
+
export { EDIT_TYPE, EDIT_TYPE_OPTIONS, EDIT_TYPE_REFLECT, EMPTY_FEATURE_COLLECTION, VkfEsriInputGeojson, types as __VkfEsriInputGeojson, VkfEsriInputGeojson as default };
|
|
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
12
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
13
|
upload: (e: UploadFile) => UploadFile;
|
|
14
14
|
edit: null;
|
|
15
|
+
fly: null;
|
|
15
16
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
17
|
disabled: BooleanConstructor;
|
|
17
18
|
dialog: BooleanConstructor;
|
|
@@ -22,6 +23,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
23
|
}>> & {
|
|
23
24
|
onUpload?: ((e: UploadFile) => any) | undefined;
|
|
24
25
|
onEdit?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
onFly?: ((...args: any[]) => any) | undefined;
|
|
25
27
|
}, {
|
|
26
28
|
disabled: boolean;
|
|
27
29
|
upload: boolean;
|
|
@@ -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: () =>
|
|
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;
|
|
@@ -93,7 +100,7 @@ export declare const props: {
|
|
|
93
100
|
};
|
|
94
101
|
error: StringConstructor;
|
|
95
102
|
validateStatus: {
|
|
96
|
-
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "
|
|
103
|
+
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
97
104
|
readonly required: false;
|
|
98
105
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
99
106
|
__epPropKey: true;
|
|
@@ -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<"
|
|
192
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"size", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"disabled", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"modelValue", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"id", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"form", 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<"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<"size", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"clearable", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"modelValue", 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<"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<"id", 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<"form", 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<"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<"size", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"disabled", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"modelValue", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"id", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"form", 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<"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<"size", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"disabled", keyof T2> | Extract<"clearable", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"modelValue", 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<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"id", keyof T2> | Extract<"resize", keyof T2> | Extract<"autosize", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"formatter", keyof T2> | Extract<"parser", keyof T2> | Extract<"form", 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<"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': null;
|
|
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" | "
|
|
208
|
+
export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("update:modelValue" | "change" | "focus" | "blur" | "input" | "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<"change", KE> | Exclude<"focus", KE> | Exclude<"blur", KE> | Exclude<"input", 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" | "change" | "focus" | "blur" | "input" | "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": null
|
|
87
117
|
});
|
|
88
118
|
const createOnEmits = onEmitsFactory(emits);
|
|
89
119
|
|