@vunk/form 1.1.11 → 1.1.13
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/form/index.js +112 -21
- package/components/form/src/ctx.d.ts +27 -1
- package/components/form/src/ctx.js +12 -0
- package/components/form/src/index.vue.d.ts +30 -0
- package/components/form/src/types.d.ts +12 -2
- package/components/form/src/utils.d.ts +15 -0
- package/components/form/src/utils.js +55 -0
- package/components/geoinput/src/ctx.d.ts +1 -1
- package/components/geoinput/src/index.vue.d.ts +3 -3
- package/components/geoinput-read/index.js +10 -4
- package/components/geoinput-read/src/core.vue.d.ts +15 -15
- package/components/geoinput-read/src/ctx.d.ts +3 -3
- package/components/geoinput-read/src/ctx.js +6 -2
- package/components/geoinput-read/src/index.vue.d.ts +17 -17
- package/components/upload-plus/index.css +85 -0
- package/components/upload-plus/index.d.ts +6 -0
- package/components/upload-plus/index.js +485 -0
- package/components/upload-plus/src/api.d.ts +31 -0
- package/components/upload-plus/src/api.js +65 -0
- package/components/upload-plus/src/const.d.ts +7 -0
- package/components/upload-plus/src/const.js +10 -0
- package/components/upload-plus/src/ctx.d.ts +59 -0
- package/components/upload-plus/src/ctx.js +34 -0
- package/components/upload-plus/src/index.vue.d.ts +163 -0
- package/components/upload-plus/src/types.d.ts +24 -0
- package/components/upload-plus/src/types.js +1 -0
- package/index.css +86 -0
- package/package.json +1 -1
- package/shared/types/form/checkbox.d.ts +1 -1
- package/shared/types/source/index.d.ts +6 -0
- package/shared/upload/index.d.ts +7 -0
- package/shared/upload/index.js +767 -0
package/components/form/index.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import { formProps, formEmits, ElForm } from 'element-plus';
|
|
2
2
|
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
3
3
|
import { NOOP } from '@vunk/core/shared/utils-function';
|
|
4
|
-
import { defineComponent, shallowRef, getCurrentInstance, provide, resolveComponent, openBlock, createBlock, mergeProps, toHandlers, withCtx, createVNode, renderSlot } from 'vue';
|
|
4
|
+
import { defineComponent, shallowRef, getCurrentInstance, provide, computed, resolveComponent, openBlock, createBlock, mergeProps, toHandlers, withCtx, createVNode, renderSlot } from 'vue';
|
|
5
5
|
import { VkfFormItemRenderer } from '@vunk/form/components/form-item-renderer';
|
|
6
6
|
import { createFormBindProps, createFormOnEmits } from '@vunk/form/shared/element-plus';
|
|
7
7
|
import { getValue } from '@vunk/core/shared/helper';
|
|
8
8
|
import { VkfTemplatesDefault } from '@vunk/form/components/templates-default';
|
|
9
|
+
import { VkfTemplatesLayout } from '@vunk/form/components/templates-layout';
|
|
10
|
+
import { pickObject } from '@vunk/core/shared/utils-object';
|
|
9
11
|
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __defProps = Object.defineProperties;
|
|
12
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
13
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
-
var __spreadValues = (a, b) => {
|
|
12
|
+
var __defProp$1 = Object.defineProperty;
|
|
13
|
+
var __defProps$1 = Object.defineProperties;
|
|
14
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
15
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
16
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
18
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
+
var __spreadValues$1 = (a, b) => {
|
|
18
20
|
for (var prop in b || (b = {}))
|
|
19
|
-
if (__hasOwnProp.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
if (__getOwnPropSymbols)
|
|
22
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
-
if (__propIsEnum.call(b, prop))
|
|
24
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
22
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
23
|
+
if (__getOwnPropSymbols$1)
|
|
24
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
25
|
+
if (__propIsEnum$1.call(b, prop))
|
|
26
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
25
27
|
}
|
|
26
28
|
return a;
|
|
27
29
|
};
|
|
28
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
29
|
-
const props = __spreadProps(__spreadValues({}, formProps), {
|
|
30
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
31
|
+
const props = __spreadProps$1(__spreadValues$1({}, formProps), {
|
|
30
32
|
data: {
|
|
31
33
|
type: Object,
|
|
32
34
|
default: () => ({})
|
|
@@ -41,10 +43,22 @@ const props = __spreadProps(__spreadValues({}, formProps), {
|
|
|
41
43
|
elRef: {
|
|
42
44
|
type: Function,
|
|
43
45
|
default: () => NOOP
|
|
46
|
+
},
|
|
47
|
+
layout: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false
|
|
50
|
+
},
|
|
51
|
+
rowSource: {
|
|
52
|
+
type: Object,
|
|
53
|
+
default: () => ({})
|
|
54
|
+
},
|
|
55
|
+
colSource: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: () => ({})
|
|
44
58
|
}
|
|
45
59
|
});
|
|
46
60
|
const createBindProps = bindPropsFactory(props);
|
|
47
|
-
const emits = __spreadProps(__spreadValues({}, formEmits), {
|
|
61
|
+
const emits = __spreadProps$1(__spreadValues$1({}, formEmits), {
|
|
48
62
|
setData: (e) => e,
|
|
49
63
|
validate: null
|
|
50
64
|
});
|
|
@@ -58,6 +72,58 @@ var ctx = /*#__PURE__*/Object.freeze({
|
|
|
58
72
|
createOnEmits: createOnEmits
|
|
59
73
|
});
|
|
60
74
|
|
|
75
|
+
var __defProp = Object.defineProperty;
|
|
76
|
+
var __defProps = Object.defineProperties;
|
|
77
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
78
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
79
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
80
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
81
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
82
|
+
var __spreadValues = (a, b) => {
|
|
83
|
+
for (var prop in b || (b = {}))
|
|
84
|
+
if (__hasOwnProp.call(b, prop))
|
|
85
|
+
__defNormalProp(a, prop, b[prop]);
|
|
86
|
+
if (__getOwnPropSymbols)
|
|
87
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
88
|
+
if (__propIsEnum.call(b, prop))
|
|
89
|
+
__defNormalProp(a, prop, b[prop]);
|
|
90
|
+
}
|
|
91
|
+
return a;
|
|
92
|
+
};
|
|
93
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
94
|
+
const getRowEmptySpan = (row) => {
|
|
95
|
+
return 24 - row.templateSlots.reduce((a, c) => {
|
|
96
|
+
if (!c.span) {
|
|
97
|
+
throw new Error("ElColSource span is required");
|
|
98
|
+
}
|
|
99
|
+
return a + c.span;
|
|
100
|
+
}, 0);
|
|
101
|
+
};
|
|
102
|
+
const genColItem = (formItem, options = {}) => {
|
|
103
|
+
var _a;
|
|
104
|
+
const span = (_a = formItem.span) != null ? _a : options.span;
|
|
105
|
+
if (span === void 0 || span === null) {
|
|
106
|
+
throw new Error("genColItem ElColSource span is required");
|
|
107
|
+
}
|
|
108
|
+
return __spreadProps(__spreadValues({}, options), {
|
|
109
|
+
templateType: "ElCol",
|
|
110
|
+
span,
|
|
111
|
+
templateSlots: [
|
|
112
|
+
pickObject(formItem, {
|
|
113
|
+
excludes: ["span"]
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
const genRowItem = (defaultItem, options = {}) => {
|
|
119
|
+
return __spreadProps(__spreadValues({}, options), {
|
|
120
|
+
templateType: "ElRow",
|
|
121
|
+
templateSlots: defaultItem ? [
|
|
122
|
+
defaultItem
|
|
123
|
+
] : []
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
|
|
61
127
|
var _export_sfc = (sfc, props) => {
|
|
62
128
|
const target = sfc.__vccOpts || sfc;
|
|
63
129
|
for (const [key, val] of props) {
|
|
@@ -73,7 +139,8 @@ const _sfc_main = defineComponent({
|
|
|
73
139
|
components: {
|
|
74
140
|
ElForm,
|
|
75
141
|
VkfFormItemRenderer,
|
|
76
|
-
VkfTemplatesDefault
|
|
142
|
+
VkfTemplatesDefault,
|
|
143
|
+
VkfTemplatesLayout
|
|
77
144
|
},
|
|
78
145
|
setup(props2, { emit }) {
|
|
79
146
|
const formProps = createFormBindProps(props2, ["model"]);
|
|
@@ -86,16 +153,39 @@ const _sfc_main = defineComponent({
|
|
|
86
153
|
formRef.value = e;
|
|
87
154
|
props2.elRef(e);
|
|
88
155
|
};
|
|
156
|
+
const rendererSource = computed(() => {
|
|
157
|
+
if (props2.layout) {
|
|
158
|
+
return props2.formItems.reduce((a, c) => {
|
|
159
|
+
const lastRow = a[a.length - 1];
|
|
160
|
+
const itemSpan = c.span ?? props2.colSource.span;
|
|
161
|
+
if (!itemSpan) {
|
|
162
|
+
a.push(c);
|
|
163
|
+
return a;
|
|
164
|
+
}
|
|
165
|
+
const colItem = genColItem(c, props2.colSource);
|
|
166
|
+
if (!lastRow || getRowEmptySpan(lastRow) < itemSpan) {
|
|
167
|
+
a.push(genRowItem(colItem, props2.rowSource));
|
|
168
|
+
} else {
|
|
169
|
+
lastRow.templateSlots.push(colItem);
|
|
170
|
+
}
|
|
171
|
+
return a;
|
|
172
|
+
}, []);
|
|
173
|
+
}
|
|
174
|
+
return props2.formItems;
|
|
175
|
+
});
|
|
89
176
|
return {
|
|
90
177
|
formProps,
|
|
91
178
|
formEmits,
|
|
92
179
|
getValue,
|
|
93
|
-
getRef
|
|
180
|
+
getRef,
|
|
181
|
+
computed,
|
|
182
|
+
rendererSource
|
|
94
183
|
};
|
|
95
184
|
}
|
|
96
185
|
});
|
|
97
186
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
98
187
|
const _component_VkfTemplatesDefault = resolveComponent("VkfTemplatesDefault");
|
|
188
|
+
const _component_VkfTemplatesLayout = resolveComponent("VkfTemplatesLayout");
|
|
99
189
|
const _component_VkfFormItemRenderer = resolveComponent("VkfFormItemRenderer");
|
|
100
190
|
const _component_ElForm = resolveComponent("ElForm");
|
|
101
191
|
return openBlock(), createBlock(_component_ElForm, mergeProps({
|
|
@@ -107,12 +197,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
197
|
ref: _ctx.getRef
|
|
108
198
|
}), {
|
|
109
199
|
default: withCtx(() => [
|
|
110
|
-
createVNode(_component_VkfFormItemRenderer, { source: _ctx.
|
|
200
|
+
createVNode(_component_VkfFormItemRenderer, { source: _ctx.rendererSource }, {
|
|
111
201
|
default: withCtx(() => [
|
|
112
202
|
createVNode(_component_VkfTemplatesDefault, {
|
|
113
203
|
data: _ctx.data,
|
|
114
204
|
onSetData: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("setData", $event))
|
|
115
205
|
}, null, 8, ["data"]),
|
|
206
|
+
createVNode(_component_VkfTemplatesLayout, { data: _ctx.data }, null, 8, ["data"]),
|
|
116
207
|
renderSlot(_ctx.$slots, "rendererTemplate")
|
|
117
208
|
]),
|
|
118
209
|
_: 3
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import type { SetDataEvent } from '@vunk/core';
|
|
3
|
+
import { ColItem, RowItem } from './types';
|
|
3
4
|
export declare const props: {
|
|
4
5
|
data: {
|
|
5
6
|
type: PropType<Record<string, any>>;
|
|
@@ -325,6 +326,31 @@ export declare const props: {
|
|
|
325
326
|
}> & {} & import("vue").ComponentCustomProperties & {}) => any>;
|
|
326
327
|
default: () => () => void;
|
|
327
328
|
};
|
|
329
|
+
/**
|
|
330
|
+
* 是否开启布局模式
|
|
331
|
+
*/
|
|
332
|
+
layout: {
|
|
333
|
+
type: BooleanConstructor;
|
|
334
|
+
default: boolean;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* itemLayout为 true 时,
|
|
338
|
+
* 该值生效
|
|
339
|
+
* el-row 添加额外属性
|
|
340
|
+
*/
|
|
341
|
+
rowSource: {
|
|
342
|
+
type: PropType<Partial<RowItem>>;
|
|
343
|
+
default: () => {};
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* itemLayout为 true 时,
|
|
347
|
+
* 该值生效
|
|
348
|
+
* el-col 添加额外属性
|
|
349
|
+
*/
|
|
350
|
+
colSource: {
|
|
351
|
+
type: PropType<Partial<ColItem>>;
|
|
352
|
+
default: () => ColItem;
|
|
353
|
+
};
|
|
328
354
|
model: ObjectConstructor;
|
|
329
355
|
rules: {
|
|
330
356
|
readonly type: PropType<Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>>>;
|
|
@@ -357,7 +383,7 @@ export declare const props: {
|
|
|
357
383
|
};
|
|
358
384
|
disabled: BooleanConstructor;
|
|
359
385
|
};
|
|
360
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"data", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"model", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"requireAsteriskPosition", keyof T2>, KE> | Exclude<Extract<"labelSuffix", keyof T2>, KE> | Exclude<Extract<"statusIcon", keyof T2>, KE> | Exclude<Extract<"validateOnRuleChange", keyof T2>, KE> | Exclude<Extract<"hideRequiredAsterisk", keyof T2>, KE> | Exclude<Extract<"scrollToError", keyof T2>, KE> | Exclude<Extract<"scrollIntoViewOptions", keyof T2>, KE> | Exclude<Extract<"formItems", keyof T2>, KE> : Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2>]: { [k in Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2>]: T2[k]; }[P]; }>;
|
|
386
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2> | Extract<"layout", keyof T2> | Extract<"rowSource", keyof T2> | Extract<"colSource", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"data", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"model", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"requireAsteriskPosition", keyof T2>, KE> | Exclude<Extract<"labelSuffix", keyof T2>, KE> | Exclude<Extract<"statusIcon", keyof T2>, KE> | Exclude<Extract<"validateOnRuleChange", keyof T2>, KE> | Exclude<Extract<"hideRequiredAsterisk", keyof T2>, KE> | Exclude<Extract<"scrollToError", keyof T2>, KE> | Exclude<Extract<"scrollIntoViewOptions", keyof T2>, KE> | Exclude<Extract<"formItems", keyof T2>, KE> | Exclude<Extract<"layout", keyof T2>, KE> | Exclude<Extract<"rowSource", keyof T2>, KE> | Exclude<Extract<"colSource", keyof T2>, KE> : Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2> | Extract<"layout", keyof T2> | Extract<"rowSource", keyof T2> | Extract<"colSource", keyof T2>]: { [k in Extract<"labelWidth", keyof T2> | Extract<"rules", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"size", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"model", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"requireAsteriskPosition", keyof T2> | Extract<"labelSuffix", keyof T2> | Extract<"statusIcon", keyof T2> | Extract<"validateOnRuleChange", keyof T2> | Extract<"hideRequiredAsterisk", keyof T2> | Extract<"scrollToError", keyof T2> | Extract<"scrollIntoViewOptions", keyof T2> | Extract<"formItems", keyof T2> | Extract<"layout", keyof T2> | Extract<"rowSource", keyof T2> | Extract<"colSource", keyof T2>]: T2[k]; }[P]; }>;
|
|
361
387
|
export declare const emits: {
|
|
362
388
|
setData: (e: SetDataEvent) => SetDataEvent<any>;
|
|
363
389
|
validate: null;
|
|
@@ -36,6 +36,18 @@ const props = __spreadProps(__spreadValues({}, formProps), {
|
|
|
36
36
|
elRef: {
|
|
37
37
|
type: Function,
|
|
38
38
|
default: () => NOOP
|
|
39
|
+
},
|
|
40
|
+
layout: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
rowSource: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default: () => ({})
|
|
47
|
+
},
|
|
48
|
+
colSource: {
|
|
49
|
+
type: Object,
|
|
50
|
+
default: () => ({})
|
|
39
51
|
}
|
|
40
52
|
});
|
|
41
53
|
const createBindProps = bindPropsFactory(props);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElForm } from 'element-plus';
|
|
2
|
+
import { RowItem } from './types';
|
|
2
3
|
declare const _default: import("vue").DefineComponent<{
|
|
3
4
|
data: {
|
|
4
5
|
type: import("vue").PropType<Record<string, any>>;
|
|
@@ -324,6 +325,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
324
325
|
}> & {} & import("vue").ComponentCustomProperties & {}) => any>;
|
|
325
326
|
default: () => () => void;
|
|
326
327
|
};
|
|
328
|
+
layout: {
|
|
329
|
+
type: BooleanConstructor;
|
|
330
|
+
default: boolean;
|
|
331
|
+
};
|
|
332
|
+
rowSource: {
|
|
333
|
+
type: import("vue").PropType<Partial<RowItem>>;
|
|
334
|
+
default: () => {};
|
|
335
|
+
};
|
|
336
|
+
colSource: {
|
|
337
|
+
type: import("vue").PropType<Partial<import("./types").ColItem>>;
|
|
338
|
+
default: () => import("./types").ColItem;
|
|
339
|
+
};
|
|
327
340
|
model: ObjectConstructor;
|
|
328
341
|
rules: {
|
|
329
342
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>>>;
|
|
@@ -378,6 +391,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
378
391
|
};
|
|
379
392
|
getValue: (obj: any, k: any, intoUndefined?: import("@vunk/core").IntoUndefined | undefined, safe?: boolean | undefined) => any;
|
|
380
393
|
getRef: (e: InstanceType<typeof ElForm>) => void;
|
|
394
|
+
computed: typeof import("@vue/reactivity").computed;
|
|
395
|
+
rendererSource: import("vue").ComputedRef<any>;
|
|
381
396
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
382
397
|
setData: (e: import("@vunk/core").SetDataEvent<any>) => import("@vunk/core").SetDataEvent<any>;
|
|
383
398
|
validate: null;
|
|
@@ -706,6 +721,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
706
721
|
}> & {} & import("vue").ComponentCustomProperties & {}) => any>;
|
|
707
722
|
default: () => () => void;
|
|
708
723
|
};
|
|
724
|
+
layout: {
|
|
725
|
+
type: BooleanConstructor;
|
|
726
|
+
default: boolean;
|
|
727
|
+
};
|
|
728
|
+
rowSource: {
|
|
729
|
+
type: import("vue").PropType<Partial<RowItem>>;
|
|
730
|
+
default: () => {};
|
|
731
|
+
};
|
|
732
|
+
colSource: {
|
|
733
|
+
type: import("vue").PropType<Partial<import("./types").ColItem>>;
|
|
734
|
+
default: () => import("./types").ColItem;
|
|
735
|
+
};
|
|
709
736
|
model: ObjectConstructor;
|
|
710
737
|
rules: {
|
|
711
738
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>>>>;
|
|
@@ -1066,5 +1093,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1066
1093
|
hideRequiredAsterisk: boolean;
|
|
1067
1094
|
scrollToError: boolean;
|
|
1068
1095
|
formItems: any[];
|
|
1096
|
+
layout: boolean;
|
|
1097
|
+
rowSource: Partial<RowItem>;
|
|
1098
|
+
colSource: Partial<import("./types").ColItem>;
|
|
1069
1099
|
}>;
|
|
1070
1100
|
export default _default;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { __VkfTemplatesDefault } from '@vunk/form/components/templates-default';
|
|
2
|
+
import { __VkfTemplatesLayout } from '@vunk/form/components/templates-layout';
|
|
3
|
+
export declare type FormItem<P extends string = string> = (__VkfTemplatesDefault.Source<P> | __VkfTemplatesLayout.ElRowSource<FormItem<P>> | __VkfTemplatesLayout.ElColSource<FormItem<P>> | __VkfTemplatesLayout.VkfFlexSource<FormItem<P>>) & {
|
|
4
|
+
/**
|
|
5
|
+
* 如果开启 props.itemLayout,那么
|
|
6
|
+
* span 将生效
|
|
7
|
+
* 1-24 之间的数字
|
|
8
|
+
*/
|
|
9
|
+
span?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare type ColItem = __VkfTemplatesLayout.ElColSource<FormItem>;
|
|
12
|
+
export declare type RowItem = __VkfTemplatesLayout.ElRowSource<ColItem>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ColItem, FormItem, RowItem } from './types';
|
|
2
|
+
import { __VkfTemplatesLayout } from '@vunk/form/components/templates-layout';
|
|
3
|
+
/**
|
|
4
|
+
* 判断 Row 中有多少空位
|
|
5
|
+
* @param row
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const getRowEmptySpan: (row: RowItem) => number;
|
|
9
|
+
/**
|
|
10
|
+
* 根据 formItem 当前的 span 包装出 elCol 的数据
|
|
11
|
+
* @param formItem
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare const genColItem: (formItem: FormItem, options?: Partial<ColItem>) => __VkfTemplatesLayout.ElColSource<FormItem<string>>;
|
|
15
|
+
export declare const genRowItem: (defaultItem: ColItem, options?: Partial<RowItem>) => RowItem;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { pickObject } from '@vunk/core/shared/utils-object';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
const getRowEmptySpan = (row) => {
|
|
23
|
+
return 24 - row.templateSlots.reduce((a, c) => {
|
|
24
|
+
if (!c.span) {
|
|
25
|
+
throw new Error("ElColSource span is required");
|
|
26
|
+
}
|
|
27
|
+
return a + c.span;
|
|
28
|
+
}, 0);
|
|
29
|
+
};
|
|
30
|
+
const genColItem = (formItem, options = {}) => {
|
|
31
|
+
var _a;
|
|
32
|
+
const span = (_a = formItem.span) != null ? _a : options.span;
|
|
33
|
+
if (span === void 0 || span === null) {
|
|
34
|
+
throw new Error("genColItem ElColSource span is required");
|
|
35
|
+
}
|
|
36
|
+
return __spreadProps(__spreadValues({}, options), {
|
|
37
|
+
templateType: "ElCol",
|
|
38
|
+
span,
|
|
39
|
+
templateSlots: [
|
|
40
|
+
pickObject(formItem, {
|
|
41
|
+
excludes: ["span"]
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const genRowItem = (defaultItem, options = {}) => {
|
|
47
|
+
return __spreadProps(__spreadValues({}, options), {
|
|
48
|
+
templateType: "ElRow",
|
|
49
|
+
templateSlots: defaultItem ? [
|
|
50
|
+
defaultItem
|
|
51
|
+
] : []
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export { genColItem, genRowItem, getRowEmptySpan };
|
|
@@ -213,6 +213,6 @@ export declare const emits: {
|
|
|
213
213
|
compositionupdate: (evt: CompositionEvent) => boolean;
|
|
214
214
|
compositionend: (evt: CompositionEvent) => boolean;
|
|
215
215
|
layerChange: (layer: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent;
|
|
216
|
-
|
|
216
|
+
layerClick: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent;
|
|
217
217
|
load: (e: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent;
|
|
218
218
|
};
|
|
@@ -303,7 +303,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
303
303
|
spikSave: boolean;
|
|
304
304
|
}>;
|
|
305
305
|
readEmits: {
|
|
306
|
-
click: (e: any) => void;
|
|
307
306
|
"update:modelValue": (e: any) => void;
|
|
308
307
|
input: (e: any) => void;
|
|
309
308
|
change: (e: any) => void;
|
|
@@ -318,6 +317,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
318
317
|
compositionend: (e: any) => void;
|
|
319
318
|
load: (e: any) => void;
|
|
320
319
|
layerChange: (e: any) => void;
|
|
320
|
+
layerClick: (e: any) => void;
|
|
321
321
|
};
|
|
322
322
|
updateEmits: {
|
|
323
323
|
"update:modelValue": (e: any) => void;
|
|
@@ -349,7 +349,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
349
349
|
compositionupdate: (evt: CompositionEvent) => boolean;
|
|
350
350
|
compositionend: (evt: CompositionEvent) => boolean;
|
|
351
351
|
layerChange: (layer: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent;
|
|
352
|
-
|
|
352
|
+
layerClick: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent;
|
|
353
353
|
load: (e: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent;
|
|
354
354
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
355
355
|
readonly: {
|
|
@@ -548,7 +548,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
548
548
|
default: () => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
|
|
549
549
|
};
|
|
550
550
|
}>> & {
|
|
551
|
-
onClick?: ((e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => any) | undefined;
|
|
552
551
|
onChange?: ((value: string) => any) | undefined;
|
|
553
552
|
"onUpdate:modelValue"?: ((e: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>) => any) | undefined;
|
|
554
553
|
onInput?: ((value: string) => any) | undefined;
|
|
@@ -563,6 +562,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
563
562
|
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
564
563
|
onLoad?: ((e: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => any) | undefined;
|
|
565
564
|
onLayerChange?: ((layer: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => any) | undefined;
|
|
565
|
+
onLayerClick?: ((e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => any) | undefined;
|
|
566
566
|
onEditUpdate?: ((e: any) => any) | undefined;
|
|
567
567
|
}, {
|
|
568
568
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -4,6 +4,7 @@ import { _VkfInputCtx, VkfInput } from '@vunk/form/components/input';
|
|
|
4
4
|
import { EMPTY_FEATURE_COLLECTION } from '@vumap/core/shared/static';
|
|
5
5
|
import { _VmGeojsonLayerCtx } from '@vumap/core/components/geojson-layer';
|
|
6
6
|
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
7
|
+
import { pickObject } from '@vunk/core/shared/utils-object';
|
|
7
8
|
import { ElButton, ElIcon, ElButtonGroup } from 'element-plus';
|
|
8
9
|
import { VmGeojsonLayer, _VmGeojsonLayerCtx as _VmGeojsonLayerCtx$1, useMap, VmTdtLayers, VmMap } from '@vumap/core';
|
|
9
10
|
import { fitGeojson } from '@vumap/core/shared/utils';
|
|
@@ -58,9 +59,12 @@ const props = __spreadProps(__spreadValues$1(__spreadValues$1({}, _VkfInputCtx.p
|
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
const createBindProps = bindPropsFactory(props);
|
|
61
|
-
const emits = __spreadProps(__spreadValues$1(__spreadValues$1({}, _VmGeojsonLayerCtx.emits
|
|
62
|
+
const emits = __spreadProps(__spreadValues$1(__spreadValues$1({}, pickObject(_VmGeojsonLayerCtx.emits, {
|
|
63
|
+
excludes: ["click"]
|
|
64
|
+
})), _VkfInputCtx.emits), {
|
|
62
65
|
"layerChange": (layer) => layer,
|
|
63
|
-
"update:modelValue": (e) => e
|
|
66
|
+
"update:modelValue": (e) => e,
|
|
67
|
+
"layerClick": (e) => e
|
|
64
68
|
});
|
|
65
69
|
const createOnEmits = onEmitsFactory(emits);
|
|
66
70
|
|
|
@@ -283,9 +287,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
283
287
|
createVNode(_component_VmGeojsonLayer, mergeProps(_ctx.mapBindProps, {
|
|
284
288
|
data: _ctx.modelValue,
|
|
285
289
|
type: _ctx.geoType,
|
|
286
|
-
onChange: _cache[0] || (_cache[0] = $event => (_ctx.$emit('layerChange', $event))),
|
|
287
290
|
paint: _ctx.paint || _ctx.paintFromEditStyles
|
|
288
|
-
}, toHandlers(_ctx.mapOnEmits)
|
|
291
|
+
}, toHandlers(_ctx.mapOnEmits), {
|
|
292
|
+
onChange: _cache[0] || (_cache[0] = $event => (_ctx.$emit('layerChange', $event))),
|
|
293
|
+
onClick: _cache[1] || (_cache[1] = $event => (_ctx.$emit('layerClick', $event)))
|
|
294
|
+
}), null, 16 /* FULL_PROPS */, ["data", "type", "paint"])
|
|
289
295
|
], 64 /* STABLE_FRAGMENT */))
|
|
290
296
|
}
|
|
291
297
|
var CoreVue = /*#__PURE__*/_export_sfc(_sfc_main$1, [['render',_sfc_render$1],['__file',"core.vue"]]);
|
|
@@ -201,17 +201,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
201
201
|
rows: number | undefined;
|
|
202
202
|
}>;
|
|
203
203
|
inputOnEmits: {
|
|
204
|
-
input: (
|
|
205
|
-
change: (
|
|
206
|
-
focus: (
|
|
207
|
-
blur: (
|
|
208
|
-
clear: (
|
|
209
|
-
mouseleave: (
|
|
210
|
-
mouseenter: (
|
|
211
|
-
keydown: (
|
|
212
|
-
compositionstart: (
|
|
213
|
-
compositionupdate: (
|
|
214
|
-
compositionend: (
|
|
204
|
+
input: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
205
|
+
change: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
206
|
+
focus: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
207
|
+
blur: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
208
|
+
clear: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
209
|
+
mouseleave: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
210
|
+
mouseenter: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
211
|
+
keydown: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
212
|
+
compositionstart: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
213
|
+
compositionupdate: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
214
|
+
compositionend: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
215
215
|
};
|
|
216
216
|
mapBindProps: import("vue").ComputedRef<{
|
|
217
217
|
id: string;
|
|
@@ -221,8 +221,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
221
221
|
before: string | undefined;
|
|
222
222
|
}>;
|
|
223
223
|
mapOnEmits: {
|
|
224
|
-
click: (
|
|
225
|
-
load: (
|
|
224
|
+
click: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
225
|
+
load: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => void;
|
|
226
226
|
};
|
|
227
227
|
append: () => JSX.Element;
|
|
228
228
|
geoType: import("vue").ComputedRef<any>;
|
|
@@ -230,6 +230,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
230
230
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
231
231
|
layerChange: (layer: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent;
|
|
232
232
|
'update:modelValue': (e: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>) => import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
|
|
233
|
+
layerClick: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent;
|
|
233
234
|
input: (value: string) => boolean;
|
|
234
235
|
change: (value: string) => boolean;
|
|
235
236
|
focus: (evt: FocusEvent) => boolean;
|
|
@@ -241,7 +242,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
241
242
|
compositionstart: (evt: CompositionEvent) => boolean;
|
|
242
243
|
compositionupdate: (evt: CompositionEvent) => boolean;
|
|
243
244
|
compositionend: (evt: CompositionEvent) => boolean;
|
|
244
|
-
click: (e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent;
|
|
245
245
|
load: (e: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent;
|
|
246
246
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
247
247
|
modelValue: {
|
|
@@ -407,7 +407,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
407
407
|
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
408
408
|
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>;
|
|
409
409
|
}>> & {
|
|
410
|
-
onClick?: ((e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => any) | undefined;
|
|
411
410
|
onChange?: ((value: string) => any) | undefined;
|
|
412
411
|
"onUpdate:modelValue"?: ((e: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>) => any) | undefined;
|
|
413
412
|
onInput?: ((value: string) => any) | undefined;
|
|
@@ -422,6 +421,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
422
421
|
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
423
422
|
onLoad?: ((e: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => any) | undefined;
|
|
424
423
|
onLayerChange?: ((layer: import("@vumap/core/components/geojson-add-layer/src/types").LoadEvent) => any) | undefined;
|
|
424
|
+
onLayerClick?: ((e: import("@vumap/core/components/geojson-layer-set/src/types").ClickEvent) => any) | undefined;
|
|
425
425
|
}, {
|
|
426
426
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
427
427
|
type: string;
|
|
@@ -172,6 +172,7 @@ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObj
|
|
|
172
172
|
export declare const emits: {
|
|
173
173
|
layerChange: (layer: __VmGeojsonLayer.LoadEvent) => __VmGeojsonLayer.LoadEvent;
|
|
174
174
|
'update:modelValue': (e: FeatureCollection) => FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
|
|
175
|
+
layerClick: (e: __VmGeojsonLayer.ClickEvent) => __VmGeojsonLayer.ClickEvent;
|
|
175
176
|
input: (value: string) => boolean;
|
|
176
177
|
change: (value: string) => boolean;
|
|
177
178
|
focus: (evt: FocusEvent) => boolean;
|
|
@@ -183,12 +184,12 @@ export declare const emits: {
|
|
|
183
184
|
compositionstart: (evt: CompositionEvent) => boolean;
|
|
184
185
|
compositionupdate: (evt: CompositionEvent) => boolean;
|
|
185
186
|
compositionend: (evt: CompositionEvent) => boolean;
|
|
186
|
-
click: (e: __VmGeojsonLayer.ClickEvent) => __VmGeojsonLayer.ClickEvent;
|
|
187
187
|
load: (e: __VmGeojsonLayer.LoadEvent) => __VmGeojsonLayer.LoadEvent;
|
|
188
188
|
};
|
|
189
|
-
export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("
|
|
189
|
+
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" | "load" | "layerChange" | "layerClick")[] | 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<"load", KE> | Exclude<"layerChange", KE> | Exclude<"layerClick", KE> : "update:modelValue" | "input" | "change" | "focus" | "blur" | "clear" | "mouseleave" | "mouseenter" | "keydown" | "compositionstart" | "compositionupdate" | "compositionend" | "load" | "layerChange" | "layerClick"]: {
|
|
190
190
|
layerChange: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
191
191
|
'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
192
|
+
layerClick: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
192
193
|
input: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
193
194
|
change: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
194
195
|
focus: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
@@ -200,6 +201,5 @@ export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX
|
|
|
200
201
|
compositionstart: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
201
202
|
compositionupdate: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
202
203
|
compositionend: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
203
|
-
click: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
204
204
|
load: (...e: import("@vunk/core").RestParameters<T2>) => void;
|
|
205
205
|
}[P]; };
|