@vunk/form 2.10.0 → 2.10.3
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/api-tables-select/index.cjs +37 -36
- package/components/api-tables-select/index.mjs +37 -36
- package/components/api-tables-select/src/ctx.d.ts +48 -13
- package/components/api-tables-select/src/index.vue.d.ts +568 -80
- package/components/button/src/ctx.d.ts +101 -17
- package/components/button/src/index.vue.d.ts +437 -101
- package/components/card-input-collection/index.cjs +67 -70
- package/components/card-input-collection/index.mjs +68 -71
- package/components/card-input-collection/src/ctx.d.ts +43 -8
- package/components/card-input-collection/src/index.vue.d.ts +718 -226
- package/components/cascader/src/ctx.d.ts +192 -46
- package/components/cascader/src/index.vue.d.ts +393 -118
- package/components/checkbox/index.cjs +2 -3
- package/components/checkbox/index.mjs +2 -3
- package/components/checkbox/src/ctx.d.ts +65 -13
- package/components/checkbox/src/index.vue.d.ts +339 -115
- package/components/color-picker/src/ctx.d.ts +76 -13
- package/components/color-picker/src/index.vue.d.ts +160 -34
- package/components/date-picker/src/ctx.d.ts +185 -36
- package/components/date-picker/src/index.vue.d.ts +974 -202
- package/components/date-picker-range/src/ctx.d.ts +168 -35
- package/components/date-picker-range/src/index.vue.d.ts +347 -82
- package/components/download-plus/index.cjs +4 -4
- package/components/download-plus/index.mjs +4 -4
- package/components/download-plus/src/ctx.d.ts +43 -8
- package/components/download-plus/src/index.vue.d.ts +618 -165
- package/components/editable-text/index.cjs +29 -15
- package/components/editable-text/index.mjs +29 -15
- package/components/editable-text/src/ctx.d.ts +51 -8
- package/components/editable-text/src/index.vue.d.ts +2827 -251
- package/components/esri-input-geojson/src/append.vue.d.ts +769 -418
- package/components/esri-input-geojson/src/ctx.d.ts +133 -32
- package/components/esri-input-geojson/src/index.vue.d.ts +262 -92
- package/components/esri-input-geojson/src/viewer.vue.d.ts +1 -1
- package/components/form/src/ctx.d.ts +59 -11
- package/components/form/src/index.vue.d.ts +3456 -186
- package/components/form-item/src/ctx.d.ts +45 -10
- package/components/form-item/src/index.vue.d.ts +484 -141
- package/components/information-collection/src/ctx.d.ts +45 -10
- package/components/information-collection/src/index.vue.d.ts +96 -26
- package/components/information-tag/src/ctx.d.ts +17 -3
- package/components/information-tag/src/index.vue.d.ts +38 -10
- package/components/input/src/ctx.d.ts +138 -33
- package/components/input/src/index.vue.d.ts +528 -152
- package/components/input-collection/index.cjs +105 -74
- package/components/input-collection/index.mjs +107 -76
- package/components/input-collection/src/ctx.d.ts +43 -8
- package/components/input-collection/src/index.vue.d.ts +756 -793
- package/components/input-link/src/ctx.d.ts +103 -25
- package/components/input-link/src/index.vue.d.ts +219 -63
- package/components/input-number/src/ctx.d.ts +123 -21
- package/components/input-number/src/index.vue.d.ts +468 -93
- package/components/input-tag/src/ctx.d.ts +141 -25
- package/components/input-tag/src/index.vue.d.ts +566 -126
- package/components/monaco-editor/src/ctx.d.ts +43 -8
- package/components/monaco-editor/src/index.vue.d.ts +91 -21
- package/components/radio/index.cjs +2 -3
- package/components/radio/index.mjs +2 -3
- package/components/radio/src/ctx.d.ts +84 -14
- package/components/radio/src/index.vue.d.ts +812 -168
- package/components/select/src/ctx.d.ts +63 -13
- package/components/select/src/index.vue.d.ts +549 -108
- package/components/slider/src/ctx.d.ts +170 -54
- package/components/slider/src/index.vue.d.ts +362 -137
- package/components/switch/src/ctx.d.ts +105 -21
- package/components/switch/src/index.vue.d.ts +453 -117
- package/components/tables-select/src/ctx.d.ts +72 -9
- package/components/tables-select/src/index.vue.d.ts +386 -82
- package/components/templates-element-plus/src/index.vue.d.ts +187 -40
- package/components/templates-layout/src/index.vue.d.ts +337 -64
- package/components/upload/index.cjs +2 -2
- package/components/upload/index.mjs +2 -2
- package/components/upload/src/ctx.d.ts +183 -89
- package/components/upload/src/file.vue.d.ts +269 -83
- package/components/upload/src/index.vue.d.ts +1246 -632
- package/components/upload-plus/index.cjs +79 -86
- package/components/upload-plus/index.mjs +79 -86
- package/components/upload-plus/src/ctx.d.ts +43 -8
- package/components/upload-plus/src/index.vue.d.ts +1008 -283
- package/components/van-cascader/src/ctx.d.ts +181 -44
- package/components/van-cascader/src/index.vue.d.ts +1532 -324
- package/components/var-datetime-picker/src/ctx.d.ts +43 -8
- package/components/var-datetime-picker/src/index.vue.d.ts +932 -190
- package/components/vditor/src/ctx.d.ts +43 -8
- package/components/vditor/src/index.vue.d.ts +91 -21
- package/package.json +1 -1
- package/shared/element-plus/ctx.d.ts +111 -30
- package/shared/element-plus/instances.d.ts +140 -28
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
5
6
|
var tablesSelect = require('@vunk/form/components/tables-select');
|
|
6
7
|
var object = require('@vunk/shared/object');
|
|
7
|
-
var vue = require('vue');
|
|
8
8
|
var form = require('@vunk/form');
|
|
9
9
|
var core = require('@vunk/core');
|
|
10
10
|
var isObject = require('../isObject.cjs');
|
|
@@ -44,9 +44,9 @@ const props = {
|
|
|
44
44
|
default: () => []
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
const emits = {
|
|
48
48
|
...tablesSelect._VkfTablesSelectCtx.emits
|
|
49
|
-
}
|
|
49
|
+
};
|
|
50
50
|
|
|
51
51
|
/** `Object#toString` result references. */
|
|
52
52
|
var symbolTag = '[object Symbol]';
|
|
@@ -372,16 +372,19 @@ function debounce(func, wait, options) {
|
|
|
372
372
|
return debounced;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
var _sfc_main = vue.defineComponent({
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
VkfTablesSelect: tablesSelect.VkfTablesSelect,
|
|
379
|
-
VkfForm: form.VkfForm
|
|
375
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
376
|
+
...{
|
|
377
|
+
name: "VkfApiTablesSelect"
|
|
380
378
|
},
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
__name: "index",
|
|
380
|
+
props: props,
|
|
381
|
+
emits,
|
|
382
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
383
|
+
__expose();
|
|
384
|
+
const props = __props;
|
|
385
|
+
const emit = __emit;
|
|
383
386
|
const debounceRead = debounce(read, 300);
|
|
384
|
-
const coreProps = tablesSelect._VkfTablesSelectCtx.createBindProps(
|
|
387
|
+
const coreProps = tablesSelect._VkfTablesSelectCtx.createBindProps(props, ["getRows"]);
|
|
385
388
|
const coreEmits = tablesSelect._VkfTablesSelectCtx.createOnEmits(emit);
|
|
386
389
|
const queryData = vue.ref({});
|
|
387
390
|
const tableState = vue.reactive({
|
|
@@ -395,7 +398,7 @@ var _sfc_main = vue.defineComponent({
|
|
|
395
398
|
vue.watch(pagination, debounceRead, { deep: true, immediate: true });
|
|
396
399
|
vue.watch(queryData, debounceRead, { deep: true });
|
|
397
400
|
async function read() {
|
|
398
|
-
const res = await
|
|
401
|
+
const res = await props.readApi(queryData.value, {
|
|
399
402
|
...pagination.value,
|
|
400
403
|
currentPage: pagination.value.start / pagination.value.pageSize + 1
|
|
401
404
|
});
|
|
@@ -403,41 +406,39 @@ var _sfc_main = vue.defineComponent({
|
|
|
403
406
|
tableState.total = res.total;
|
|
404
407
|
}
|
|
405
408
|
const defaultGetRows = async (ids) => {
|
|
406
|
-
const { rows } = await
|
|
409
|
+
const { rows } = await props.readApi({
|
|
407
410
|
ids: ids.join(",")
|
|
408
411
|
});
|
|
409
412
|
return rows;
|
|
410
413
|
};
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
414
|
+
const __returned__ = { props, emit, debounceRead, coreProps, coreEmits, queryData, tableState, pagination, read, defaultGetRows, get VkfTablesSelect() {
|
|
415
|
+
return tablesSelect.VkfTablesSelect;
|
|
416
|
+
}, get VkfForm() {
|
|
417
|
+
return form.VkfForm;
|
|
418
|
+
}, get setData() {
|
|
419
|
+
return core.setData;
|
|
420
|
+
} };
|
|
421
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
422
|
+
return __returned__;
|
|
420
423
|
}
|
|
421
424
|
});
|
|
422
425
|
|
|
423
426
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
"onUpdate:
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
"get-rows": _ctx.getRows || _ctx.defaultGetRows
|
|
434
|
-
}, _ctx.coreProps, vue.toHandlers(_ctx.coreEmits)), {
|
|
427
|
+
return vue.openBlock(), vue.createBlock($setup["VkfTablesSelect"], vue.mergeProps({
|
|
428
|
+
start: $setup.pagination.start,
|
|
429
|
+
"onUpdate:start": _cache[1] || (_cache[1] = ($event) => $setup.pagination.start = $event),
|
|
430
|
+
"page-size": $setup.pagination.pageSize,
|
|
431
|
+
"onUpdate:pageSize": _cache[2] || (_cache[2] = ($event) => $setup.pagination.pageSize = $event),
|
|
432
|
+
data: $setup.tableState.data,
|
|
433
|
+
total: $setup.tableState.total,
|
|
434
|
+
"get-rows": _ctx.getRows || $setup.defaultGetRows
|
|
435
|
+
}, $setup.coreProps, vue.toHandlers($setup.coreEmits)), {
|
|
435
436
|
dialog: vue.withCtx(() => [
|
|
436
|
-
vue.createVNode(
|
|
437
|
+
vue.createVNode($setup["VkfForm"], {
|
|
437
438
|
"form-items": _ctx.queryItems,
|
|
438
439
|
inline: true,
|
|
439
|
-
data:
|
|
440
|
-
onSetData: _cache[0] || (_cache[0] = ($event) =>
|
|
440
|
+
data: $setup.queryData,
|
|
441
|
+
onSetData: _cache[0] || (_cache[0] = ($event) => $setup.setData($setup.queryData, $event))
|
|
441
442
|
}, null, 8, ["form-items", "data"]),
|
|
442
443
|
vue.renderSlot(_ctx.$slots, "dialog")
|
|
443
444
|
]),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { defineComponent, ref, reactive, watch, openBlock, createBlock, mergeProps, toHandlers, withCtx, createVNode, renderSlot } from 'vue';
|
|
1
2
|
import { _VkfTablesSelectCtx, VkfTablesSelect } from '@vunk/form/components/tables-select';
|
|
2
3
|
import { pickObject } from '@vunk/shared/object';
|
|
3
|
-
import { defineComponent, ref, reactive, watch, resolveComponent, openBlock, createBlock, mergeProps, toHandlers, withCtx, createVNode, renderSlot } from 'vue';
|
|
4
4
|
import { VkfForm } from '@vunk/form';
|
|
5
5
|
import { setData } from '@vunk/core';
|
|
6
6
|
import { i as isObjectLike, b as baseGetTag, a as isObject, r as root } from '../isObject.mjs';
|
|
@@ -40,9 +40,9 @@ const props = {
|
|
|
40
40
|
default: () => []
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
|
|
43
|
+
const emits = {
|
|
44
44
|
..._VkfTablesSelectCtx.emits
|
|
45
|
-
}
|
|
45
|
+
};
|
|
46
46
|
|
|
47
47
|
/** `Object#toString` result references. */
|
|
48
48
|
var symbolTag = '[object Symbol]';
|
|
@@ -368,16 +368,19 @@ function debounce(func, wait, options) {
|
|
|
368
368
|
return debounced;
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
var _sfc_main = defineComponent({
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
VkfTablesSelect,
|
|
375
|
-
VkfForm
|
|
371
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
372
|
+
...{
|
|
373
|
+
name: "VkfApiTablesSelect"
|
|
376
374
|
},
|
|
377
|
-
|
|
378
|
-
|
|
375
|
+
__name: "index",
|
|
376
|
+
props: props,
|
|
377
|
+
emits,
|
|
378
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
379
|
+
__expose();
|
|
380
|
+
const props = __props;
|
|
381
|
+
const emit = __emit;
|
|
379
382
|
const debounceRead = debounce(read, 300);
|
|
380
|
-
const coreProps = _VkfTablesSelectCtx.createBindProps(
|
|
383
|
+
const coreProps = _VkfTablesSelectCtx.createBindProps(props, ["getRows"]);
|
|
381
384
|
const coreEmits = _VkfTablesSelectCtx.createOnEmits(emit);
|
|
382
385
|
const queryData = ref({});
|
|
383
386
|
const tableState = reactive({
|
|
@@ -391,7 +394,7 @@ var _sfc_main = defineComponent({
|
|
|
391
394
|
watch(pagination, debounceRead, { deep: true, immediate: true });
|
|
392
395
|
watch(queryData, debounceRead, { deep: true });
|
|
393
396
|
async function read() {
|
|
394
|
-
const res = await
|
|
397
|
+
const res = await props.readApi(queryData.value, {
|
|
395
398
|
...pagination.value,
|
|
396
399
|
currentPage: pagination.value.start / pagination.value.pageSize + 1
|
|
397
400
|
});
|
|
@@ -399,41 +402,39 @@ var _sfc_main = defineComponent({
|
|
|
399
402
|
tableState.total = res.total;
|
|
400
403
|
}
|
|
401
404
|
const defaultGetRows = async (ids) => {
|
|
402
|
-
const { rows } = await
|
|
405
|
+
const { rows } = await props.readApi({
|
|
403
406
|
ids: ids.join(",")
|
|
404
407
|
});
|
|
405
408
|
return rows;
|
|
406
409
|
};
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
410
|
+
const __returned__ = { props, emit, debounceRead, coreProps, coreEmits, queryData, tableState, pagination, read, defaultGetRows, get VkfTablesSelect() {
|
|
411
|
+
return VkfTablesSelect;
|
|
412
|
+
}, get VkfForm() {
|
|
413
|
+
return VkfForm;
|
|
414
|
+
}, get setData() {
|
|
415
|
+
return setData;
|
|
416
|
+
} };
|
|
417
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
418
|
+
return __returned__;
|
|
416
419
|
}
|
|
417
420
|
});
|
|
418
421
|
|
|
419
422
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
"onUpdate:
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
"get-rows": _ctx.getRows || _ctx.defaultGetRows
|
|
430
|
-
}, _ctx.coreProps, toHandlers(_ctx.coreEmits)), {
|
|
423
|
+
return openBlock(), createBlock($setup["VkfTablesSelect"], mergeProps({
|
|
424
|
+
start: $setup.pagination.start,
|
|
425
|
+
"onUpdate:start": _cache[1] || (_cache[1] = ($event) => $setup.pagination.start = $event),
|
|
426
|
+
"page-size": $setup.pagination.pageSize,
|
|
427
|
+
"onUpdate:pageSize": _cache[2] || (_cache[2] = ($event) => $setup.pagination.pageSize = $event),
|
|
428
|
+
data: $setup.tableState.data,
|
|
429
|
+
total: $setup.tableState.total,
|
|
430
|
+
"get-rows": _ctx.getRows || $setup.defaultGetRows
|
|
431
|
+
}, $setup.coreProps, toHandlers($setup.coreEmits)), {
|
|
431
432
|
dialog: withCtx(() => [
|
|
432
|
-
createVNode(
|
|
433
|
+
createVNode($setup["VkfForm"], {
|
|
433
434
|
"form-items": _ctx.queryItems,
|
|
434
435
|
inline: true,
|
|
435
|
-
data:
|
|
436
|
-
onSetData: _cache[0] || (_cache[0] = ($event) =>
|
|
436
|
+
data: $setup.queryData,
|
|
437
|
+
onSetData: _cache[0] || (_cache[0] = ($event) => $setup.setData($setup.queryData, $event))
|
|
437
438
|
}, null, 8, ["form-items", "data"]),
|
|
438
439
|
renderSlot(_ctx.$slots, "dialog")
|
|
439
440
|
]),
|
|
@@ -27,18 +27,25 @@ export declare const props: {
|
|
|
27
27
|
type: PropType<any[]>;
|
|
28
28
|
default: () => any[];
|
|
29
29
|
};
|
|
30
|
+
type: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
required: {
|
|
35
|
+
readonly type: PropType<boolean>;
|
|
36
|
+
readonly required: false;
|
|
37
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
38
|
+
__epPropKey: true;
|
|
39
|
+
} & {
|
|
40
|
+
readonly default: undefined;
|
|
41
|
+
};
|
|
42
|
+
small: BooleanConstructor;
|
|
30
43
|
size: {
|
|
31
44
|
readonly type: PropType<import("element-plus").ButtonType<StringConstructor, "" | "small" | "default" | "large", never>>;
|
|
32
45
|
readonly required: false;
|
|
33
46
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
34
47
|
__epPropKey: true;
|
|
35
48
|
};
|
|
36
|
-
type: {
|
|
37
|
-
type: StringConstructor;
|
|
38
|
-
default: string;
|
|
39
|
-
};
|
|
40
|
-
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
41
|
-
small: BooleanConstructor;
|
|
42
49
|
formItemSize: {
|
|
43
50
|
type: PropType<"default" | "small" | "large">;
|
|
44
51
|
default: "default" | "small" | "large";
|
|
@@ -73,25 +80,53 @@ export declare const props: {
|
|
|
73
80
|
default: boolean;
|
|
74
81
|
};
|
|
75
82
|
label: StringConstructor;
|
|
76
|
-
labelWidth:
|
|
77
|
-
|
|
83
|
+
labelWidth: {
|
|
84
|
+
readonly type: PropType<string | number>;
|
|
85
|
+
readonly required: false;
|
|
86
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
87
|
+
__epPropKey: true;
|
|
88
|
+
} & {
|
|
89
|
+
readonly default: "";
|
|
90
|
+
};
|
|
91
|
+
labelPosition: {
|
|
92
|
+
readonly type: PropType<"" | "top" | "left" | "right">;
|
|
93
|
+
readonly required: false;
|
|
94
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
95
|
+
__epPropKey: true;
|
|
96
|
+
} & {
|
|
97
|
+
readonly default: "";
|
|
98
|
+
};
|
|
78
99
|
prop: any;
|
|
79
100
|
rules: {
|
|
80
|
-
readonly type:
|
|
101
|
+
readonly type: PropType<unknown>;
|
|
81
102
|
readonly required: false;
|
|
82
103
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
83
104
|
__epPropKey: true;
|
|
84
105
|
};
|
|
85
106
|
error: StringConstructor;
|
|
86
107
|
validateStatus: {
|
|
87
|
-
readonly type:
|
|
108
|
+
readonly type: PropType<"" | "error" | "success" | "validating">;
|
|
88
109
|
readonly required: false;
|
|
89
110
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
90
111
|
__epPropKey: true;
|
|
91
112
|
};
|
|
92
113
|
for: StringConstructor;
|
|
93
|
-
inlineMessage:
|
|
94
|
-
|
|
114
|
+
inlineMessage: {
|
|
115
|
+
readonly type: PropType<string | boolean>;
|
|
116
|
+
readonly required: false;
|
|
117
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
118
|
+
__epPropKey: true;
|
|
119
|
+
} & {
|
|
120
|
+
readonly default: "";
|
|
121
|
+
};
|
|
122
|
+
showMessage: {
|
|
123
|
+
readonly type: PropType<boolean>;
|
|
124
|
+
readonly required: false;
|
|
125
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
126
|
+
__epPropKey: true;
|
|
127
|
+
} & {
|
|
128
|
+
readonly default: true;
|
|
129
|
+
};
|
|
95
130
|
disabled: {
|
|
96
131
|
type: BooleanConstructor;
|
|
97
132
|
default: undefined;
|
|
@@ -99,7 +134,7 @@ export declare const props: {
|
|
|
99
134
|
teleported: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
100
135
|
className: StringConstructor;
|
|
101
136
|
popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
102
|
-
fixed: (
|
|
137
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
103
138
|
filters: PropType<import("element-plus/es/components/table/src/table-column/defaults").Filters>;
|
|
104
139
|
modelValue: {
|
|
105
140
|
type: PropType<NormalObject[] | string>;
|