@vunk/form 1.1.29 → 1.1.30

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, ref, watch, onMounted, nextTick, mergeProps, toHandlers, withDirectives, vShow } from 'vue';
1
+ import { openBlock, createElementBlock, createElementVNode, defineComponent, resolveComponent, createBlock, withCtx, createVNode, createCommentVNode, provide, renderSlot, ref, shallowRef, computed, watch, onMounted, nextTick, mergeProps, toHandlers, withDirectives, vShow } from 'vue';
2
2
  import { _VkfInputCtx, VkfInput } from '@vunk/form/components/input';
3
3
  import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
4
4
  import { ElButton, ElIcon, ElButtonGroup, ElUpload, ElMessage } from 'element-plus';
@@ -128,7 +128,9 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
128
128
  bindPropsFactory(props);
129
129
  const emits = __spreadProps(__spreadValues({}, _VkfInputCtx.emits), {
130
130
  "update:modelValue": (e) => e,
131
- "update:flying": null
131
+ "update:flying": null,
132
+ "appendFly": null,
133
+ appendEdit: null
132
134
  });
133
135
  onEmitsFactory(emits);
134
136
 
@@ -335,8 +337,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
335
337
  }, 8, ["on-change", "disabled", "onClick"])) : createCommentVNode("v-if", true),
336
338
  _ctx.dialog ? (openBlock(), createBlock(_component_ElButton, {
337
339
  key: 1,
338
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit")),
339
- disabled: _ctx.disabled
340
+ disabled: _ctx.disabled,
341
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("edit"))
340
342
  }, {
341
343
  default: withCtx(() => [
342
344
  createVNode(_component_ElIcon, { color: "var(--el-color-primary)" }, {
@@ -374,7 +376,8 @@ const _sfc_main$1 = defineComponent({
374
376
  },
375
377
  props: {
376
378
  view: {
377
- type: Object
379
+ type: Object,
380
+ default: void 0
378
381
  }
379
382
  },
380
383
  setup(props) {
@@ -1341,14 +1344,15 @@ var _sfc_main = defineComponent({
1341
1344
  DocumentChecked: document_checked_default,
1342
1345
  VaGraphicsLayer
1343
1346
  },
1344
- emits,
1345
1347
  props,
1348
+ emits,
1346
1349
  setup(props2, {
1347
1350
  emit
1348
1351
  }) {
1349
1352
  const inputBindProps = _VkfInputCtx.createBindProps(props2, ["inputSlots", "readonly", "modelValue"]);
1350
1353
  const inputOnEmits = _VkfInputCtx.createOnEmits(emit, ["update:modelValue"]);
1351
1354
  const readonly = useComputedReadonly(props2);
1355
+ const sketchIf = ref(!props2.view);
1352
1356
  const sketchRef = shallowRef();
1353
1357
  const shetchPanel = computed(() => {
1354
1358
  var _a;
@@ -1413,14 +1417,23 @@ var _sfc_main = defineComponent({
1413
1417
  type: "success"
1414
1418
  });
1415
1419
  dialogShow.value = false;
1420
+ if (props2.view) {
1421
+ sketchIf.value = false;
1422
+ }
1416
1423
  };
1417
1424
  const append = () => createVNode(AppendVue, {
1418
- "dialog": props2.dialogEdit,
1425
+ "dialog": !readonly.value && props2.dialogEdit,
1419
1426
  "upload": !readonly.value,
1420
1427
  "disabled": props2.disabled,
1421
1428
  "onUpload": onUpload,
1422
1429
  "onEdit": onEdit,
1423
- "onFly": fly
1430
+ "onFly": () => {
1431
+ if (!props2.showMap && !props2.view) {
1432
+ dialogShow.value = true;
1433
+ }
1434
+ emit("appendFly");
1435
+ fly();
1436
+ }
1424
1437
  }, null);
1425
1438
  async function onUpload(e) {
1426
1439
  if (!e.raw)
@@ -1432,7 +1445,12 @@ var _sfc_main = defineComponent({
1432
1445
  }).then(fly);
1433
1446
  }
1434
1447
  function onEdit() {
1435
- dialogShow.value = true;
1448
+ if (!props2.view) {
1449
+ dialogShow.value = true;
1450
+ } else {
1451
+ sketchIf.value = true;
1452
+ }
1453
+ emit("appendEdit");
1436
1454
  }
1437
1455
  function u() {
1438
1456
  sketchValueUpdating.value = true;
@@ -1496,15 +1514,16 @@ var _sfc_main = defineComponent({
1496
1514
  mapTo,
1497
1515
  doSave,
1498
1516
  readonly,
1499
- layerLoad
1517
+ layerLoad,
1518
+ sketchIf
1500
1519
  };
1501
1520
  }
1502
1521
  });
1503
1522
 
1504
1523
  const _hoisted_1 = { class: "vkf-form-item" };
1505
1524
  const _hoisted_2 = {
1506
- class: "vkf-esri-input-geojson__map",
1507
- ref: "normalMapRef"
1525
+ ref: "normalMapRef",
1526
+ class: "vkf-esri-input-geojson__map"
1508
1527
  };
1509
1528
  const _hoisted_3 = {
1510
1529
  ref: "dialogMapRef",
@@ -1524,17 +1543,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1524
1543
  return (openBlock(), createElementBlock("div", _hoisted_1, [
1525
1544
  createVNode(_component_VkfInput, mergeProps({
1526
1545
  readonly: true,
1527
- modelValue: JSON.stringify(_ctx.modelValue)
1528
- }, _ctx.inputBindProps, toHandlers(_ctx.inputOnEmits), {
1529
- inputSlots: {
1546
+ "model-value": JSON.stringify(_ctx.modelValue)
1547
+ }, _ctx.inputBindProps, {
1548
+ "input-slots": {
1530
1549
  append: _ctx.append
1531
1550
  }
1532
- }), null, 16 /* FULL_PROPS */, ["modelValue", "inputSlots"]),
1551
+ }, toHandlers(_ctx.inputOnEmits)), null, 16 /* FULL_PROPS */, ["model-value", "input-slots"]),
1533
1552
  createVNode(_component_VkAsyncTeleport, { to: _ctx.mapTo }, {
1534
1553
  default: withCtx(() => [
1535
1554
  createVNode(_component_ViewerVue, { view: _ctx.view }, {
1536
1555
  default: withCtx(() => [
1537
- (_ctx.readonly)
1556
+ (_ctx.readonly || !_ctx.sketchIf)
1538
1557
  ? (openBlock(), createBlock(_component_VaGraphicsLayer, {
1539
1558
  key: 0,
1540
1559
  graphics: _ctx.sketchValue,
@@ -1542,12 +1561,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1542
1561
  }, null, 8 /* PROPS */, ["graphics", "onLoad"]))
1543
1562
  : (openBlock(), createBlock(_component_VaSketch, {
1544
1563
  key: 1,
1545
- viewModelActiveFillSymbol: _ctx.viewModelActiveFillSymbol,
1546
- viewModelActiveLineSymbol: _ctx.viewModelActiveLineSymbol,
1547
- viewModelActivePointSymbol: _ctx.viewModelActivePointSymbol,
1564
+ "view-model-active-fill-symbol": _ctx.viewModelActiveFillSymbol,
1565
+ "view-model-active-line-symbol": _ctx.viewModelActiveLineSymbol,
1566
+ "view-model-active-point-symbol": _ctx.viewModelActivePointSymbol,
1548
1567
  multiple: _ctx.multiple,
1549
- availableCreatureTools: _ctx.availableCreatureTools,
1550
- modelValue: _ctx.sketchValue,
1568
+ "available-creature-tools": _ctx.availableCreatureTools,
1569
+ "model-value": _ctx.sketchValue,
1551
1570
  "onUpdate:modelValue": _ctx.handleUpdateSketchValue,
1552
1571
  onLoad: _ctx.sketchLoad
1553
1572
  }, {
@@ -1573,7 +1592,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1573
1592
  : createCommentVNode("v-if", true)
1574
1593
  ]),
1575
1594
  _: 1 /* STABLE */
1576
- }, 8 /* PROPS */, ["viewModelActiveFillSymbol", "viewModelActiveLineSymbol", "viewModelActivePointSymbol", "multiple", "availableCreatureTools", "modelValue", "onUpdate:modelValue", "onLoad"]))
1595
+ }, 8 /* PROPS */, ["view-model-active-fill-symbol", "view-model-active-line-symbol", "view-model-active-point-symbol", "multiple", "available-creature-tools", "model-value", "onUpdate:modelValue", "onLoad"]))
1577
1596
  ]),
1578
1597
  _: 1 /* STABLE */
1579
1598
  }, 8 /* PROPS */, ["view"])
@@ -1588,12 +1607,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1588
1607
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.dialogShow) = $event)),
1589
1608
  title: _ctx.dialogEditTitle,
1590
1609
  fullscreen: _ctx.dialogEditFullscreen,
1591
- modalClass: "vkf-esri-input-geojson-dialog",
1592
- appendToBody: true,
1610
+ "modal-class": "vkf-esri-input-geojson-dialog",
1611
+ "append-to-body": true,
1612
+ "close-on-click-modal": false,
1613
+ draggable: true,
1593
1614
  onOpen: _ctx.dialogOnOpen,
1594
- onClose: _ctx.dialogOnClose,
1595
- closeOnClickModal: false,
1596
- draggable: true
1615
+ onClose: _ctx.dialogOnClose
1597
1616
  }, {
1598
1617
  default: withCtx(() => [
1599
1618
  createElementVNode("div", _hoisted_3, null, 512 /* NEED_PATCH */)
@@ -193,6 +193,11 @@ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObj
193
193
  export declare const emits: {
194
194
  'update:modelValue': (e: FeatureCollection) => FeatureCollection<Geometry, import("geojson").GeoJsonProperties>;
195
195
  'update:flying': null;
196
+ /**
197
+ * 点击地图定位按钮
198
+ */
199
+ appendFly: null;
200
+ appendEdit: null;
196
201
  input: (value: string) => boolean;
197
202
  change: (value: string) => boolean;
198
203
  focus: (evt: FocusEvent) => boolean;
@@ -205,9 +210,11 @@ export declare const emits: {
205
210
  compositionupdate: (evt: CompositionEvent) => boolean;
206
211
  compositionend: (evt: CompositionEvent) => boolean;
207
212
  };
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"]: {
213
+ 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" | "appendFly" | "appendEdit")[] | 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> | Exclude<"appendFly", KE> | Exclude<"appendEdit", KE> : "update:modelValue" | "input" | "change" | "focus" | "blur" | "clear" | "mouseleave" | "mouseenter" | "keydown" | "compositionstart" | "compositionupdate" | "compositionend" | "update:flying" | "appendFly" | "appendEdit"]: {
209
214
  'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
210
215
  'update:flying': (...e: import("@vunk/core").RestParameters<T2>) => void;
216
+ appendFly: (...e: import("@vunk/core").RestParameters<T2>) => void;
217
+ appendEdit: (...e: import("@vunk/core").RestParameters<T2>) => void;
211
218
  input: (...e: import("@vunk/core").RestParameters<T2>) => void;
212
219
  change: (...e: import("@vunk/core").RestParameters<T2>) => void;
213
220
  focus: (...e: import("@vunk/core").RestParameters<T2>) => void;
@@ -113,7 +113,9 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
113
113
  const createBindProps = bindPropsFactory(props);
114
114
  const emits = __spreadProps(__spreadValues({}, _VkfInputCtx.emits), {
115
115
  "update:modelValue": (e) => e,
116
- "update:flying": null
116
+ "update:flying": null,
117
+ "appendFly": null,
118
+ appendEdit: null
117
119
  });
118
120
  const createOnEmits = onEmitsFactory(emits);
119
121
 
@@ -258,9 +258,12 @@ declare const _default: import("vue").DefineComponent<{
258
258
  doSave: () => void;
259
259
  readonly: import("vue").ComputedRef<boolean>;
260
260
  layerLoad: __VaGraphicsLayer.OnLoad;
261
+ sketchIf: Ref<boolean>;
261
262
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
262
263
  'update:modelValue': (e: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>) => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
263
264
  'update:flying': null;
265
+ appendFly: null;
266
+ appendEdit: null;
264
267
  input: (value: string) => boolean;
265
268
  change: (value: string) => boolean;
266
269
  focus: (evt: FocusEvent) => boolean;
@@ -473,6 +476,8 @@ declare const _default: import("vue").DefineComponent<{
473
476
  onCompositionupdate?: ((evt: CompositionEvent) => any) | undefined;
474
477
  onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
475
478
  "onUpdate:flying"?: ((...args: any[]) => any) | undefined;
479
+ onAppendFly?: ((...args: any[]) => any) | undefined;
480
+ onAppendEdit?: ((...args: any[]) => any) | undefined;
476
481
  }, {
477
482
  required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
478
483
  type: string;
@@ -3,10 +3,14 @@ import MapView from '@arcgis/core/views/MapView';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  view: {
5
5
  type: PropType<MapView>;
6
+ default: undefined;
6
7
  };
7
8
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
9
  view: {
9
10
  type: PropType<MapView>;
11
+ default: undefined;
10
12
  };
11
- }>>, {}>;
13
+ }>>, {
14
+ view: MapView;
15
+ }>;
12
16
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "1.1.29",
3
+ "version": "1.1.30",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {