@vunk/form 2.16.10 → 2.17.0
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/dialog-input-collection/index.cjs +23 -9
- package/components/dialog-input-collection/index.mjs +25 -11
- package/components/dialog-input-collection/src/ctx.d.ts +8 -0
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +9 -3
- package/components/dialog-input-collection/src/index.vue.d.ts +26 -4
- package/components/templates-default/index.cjs +10 -0
- package/components/templates-default/index.mjs +10 -0
- package/components/templates-default/src/index.vue.d.ts +11 -0
- package/components/templates-default/src/types.d.ts +3 -1
- package/components/time-picker/index.cjs +114 -0
- package/components/time-picker/index.d.ts +5 -0
- package/components/time-picker/index.mjs +107 -0
- package/components/time-picker/src/ctx.d.ts +364 -0
- package/components/time-picker/src/index.vue.d.ts +1670 -0
- package/components/time-picker/src/types.d.ts +19 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1 -0
- package/package.json +6 -1
- package/shared/const/index.d.ts +1 -1
- package/shared/element-plus/ctx.d.ts +9 -0
- package/shared/element-plus/index.cjs +17 -0
- package/shared/element-plus/index.mjs +14 -1
- package/shared/element-plus/instances.d.ts +260 -0
|
@@ -72,10 +72,18 @@ const props = {
|
|
|
72
72
|
modules: {
|
|
73
73
|
type: Array,
|
|
74
74
|
default: () => ["operations:add"]
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* @description 正在编辑的 dialog 表单数据
|
|
78
|
+
*/
|
|
79
|
+
formdata: {
|
|
80
|
+
type: Object,
|
|
81
|
+
default: void 0
|
|
75
82
|
}
|
|
76
83
|
};
|
|
77
84
|
const emits = {
|
|
78
|
-
"update:modelValue": null
|
|
85
|
+
"update:modelValue": null,
|
|
86
|
+
"update:formdata": null
|
|
79
87
|
};
|
|
80
88
|
|
|
81
89
|
var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -108,14 +116,18 @@ var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
108
116
|
validateCatch: {
|
|
109
117
|
type: Function,
|
|
110
118
|
default: form.validateCatch
|
|
111
|
-
}
|
|
119
|
+
},
|
|
120
|
+
formdata: null
|
|
112
121
|
},
|
|
113
|
-
emits: ["update:modelValue", "update:visible", "change"],
|
|
122
|
+
emits: ["update:modelValue", "update:visible", "change", "update:formdata"],
|
|
114
123
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
115
124
|
__expose();
|
|
116
125
|
const props = __props;
|
|
117
126
|
const emit = __emit;
|
|
118
|
-
const formData =
|
|
127
|
+
const formData = composables.useModelComputed({
|
|
128
|
+
key: "formdata",
|
|
129
|
+
default: {}
|
|
130
|
+
}, props, emit);
|
|
119
131
|
const formDef = composables.useDeferred();
|
|
120
132
|
formDef.promise.then((form) => {
|
|
121
133
|
props.dialogFormProps.elRef?.(form);
|
|
@@ -492,11 +504,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
492
504
|
type: "primary",
|
|
493
505
|
onClick: _cache[1] || (_cache[1] = ($event) => $setup.handlePlus(-1))
|
|
494
506
|
}, {
|
|
495
|
-
default: vue.withCtx(() => _cache[
|
|
507
|
+
default: vue.withCtx(() => _cache[6] || (_cache[6] = [
|
|
496
508
|
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
497
509
|
])),
|
|
498
510
|
_: 1,
|
|
499
|
-
__: [
|
|
511
|
+
__: [6]
|
|
500
512
|
})
|
|
501
513
|
])) : vue.createCommentVNode("v-if", true),
|
|
502
514
|
vue.createVNode($setup["ElTable"], {
|
|
@@ -523,11 +535,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
523
535
|
icon: $setup.Plus,
|
|
524
536
|
onClick: _cache[0] || (_cache[0] = ($event) => $setup.handlePlus(-1))
|
|
525
537
|
}, {
|
|
526
|
-
default: vue.withCtx(() => _cache[
|
|
538
|
+
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
|
527
539
|
vue.createTextVNode(" \u6DFB\u52A0 ")
|
|
528
540
|
])),
|
|
529
541
|
_: 1,
|
|
530
|
-
__: [
|
|
542
|
+
__: [5]
|
|
531
543
|
}, 8, ["icon"])) : vue.createCommentVNode("v-if", true)
|
|
532
544
|
]),
|
|
533
545
|
key: "0"
|
|
@@ -541,9 +553,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
541
553
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => $setup.cuState.dialogVisible = $event),
|
|
542
554
|
modelValue: $setup.cuState.data,
|
|
543
555
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.cuState.data = $event),
|
|
556
|
+
formdata: _ctx.formdata,
|
|
544
557
|
"form-items": $setup.cuFormItems,
|
|
545
558
|
"dialog-form-props": _ctx.dialogFormProps,
|
|
546
559
|
"validate-catch": _ctx.validateCatch,
|
|
560
|
+
"onUpdate:formdata": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("update:formdata", $event)),
|
|
547
561
|
onChange: $setup.handleDialogFormChange
|
|
548
562
|
}, {
|
|
549
563
|
header: vue.withCtx(() => [
|
|
@@ -562,7 +576,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
562
576
|
]),
|
|
563
577
|
_: 1
|
|
564
578
|
/* STABLE */
|
|
565
|
-
}, 8, ["visible", "modelValue", "form-items", "dialog-form-props", "validate-catch"])
|
|
579
|
+
}, 8, ["visible", "modelValue", "formdata", "form-items", "dialog-form-props", "validate-catch"])
|
|
566
580
|
]),
|
|
567
581
|
_: 3
|
|
568
582
|
/* FORWARDED */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, watch, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, createTextVNode, mergeProps, computed, Fragment, reactive, createElementBlock, normalizeProps, guardReactiveProps, createSlots, createCommentVNode, createElementVNode, toDisplayString } from 'vue';
|
|
2
2
|
import { p as plus_default, e as edit_default, d as delete_default } from '../index.mjs';
|
|
3
3
|
import { setData, ensetData, getValue } from '@vunk/core';
|
|
4
4
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
@@ -9,7 +9,7 @@ import { VkTableColumns } from '@vunk/plus/components/table-columns';
|
|
|
9
9
|
import { CRUD } from '@vunk/shared/enum';
|
|
10
10
|
import { isCallable } from '@vunk/shared/function';
|
|
11
11
|
import { ElDialog, ElButton, ElPopconfirm, ElTable } from 'element-plus';
|
|
12
|
-
import { useDeferred } from '@vunk/core/composables';
|
|
12
|
+
import { useModelComputed, useDeferred } from '@vunk/core/composables';
|
|
13
13
|
import { VkfForm } from '@vunk/form/components/form';
|
|
14
14
|
import { validateCatch } from '@vunk/form/shared/form';
|
|
15
15
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
@@ -68,10 +68,18 @@ const props = {
|
|
|
68
68
|
modules: {
|
|
69
69
|
type: Array,
|
|
70
70
|
default: () => ["operations:add"]
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* @description 正在编辑的 dialog 表单数据
|
|
74
|
+
*/
|
|
75
|
+
formdata: {
|
|
76
|
+
type: Object,
|
|
77
|
+
default: void 0
|
|
71
78
|
}
|
|
72
79
|
};
|
|
73
80
|
const emits = {
|
|
74
|
-
"update:modelValue": null
|
|
81
|
+
"update:modelValue": null,
|
|
82
|
+
"update:formdata": null
|
|
75
83
|
};
|
|
76
84
|
|
|
77
85
|
var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
@@ -104,14 +112,18 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
104
112
|
validateCatch: {
|
|
105
113
|
type: Function,
|
|
106
114
|
default: validateCatch
|
|
107
|
-
}
|
|
115
|
+
},
|
|
116
|
+
formdata: null
|
|
108
117
|
},
|
|
109
|
-
emits: ["update:modelValue", "update:visible", "change"],
|
|
118
|
+
emits: ["update:modelValue", "update:visible", "change", "update:formdata"],
|
|
110
119
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
111
120
|
__expose();
|
|
112
121
|
const props = __props;
|
|
113
122
|
const emit = __emit;
|
|
114
|
-
const formData =
|
|
123
|
+
const formData = useModelComputed({
|
|
124
|
+
key: "formdata",
|
|
125
|
+
default: {}
|
|
126
|
+
}, props, emit);
|
|
115
127
|
const formDef = useDeferred();
|
|
116
128
|
formDef.promise.then((form) => {
|
|
117
129
|
props.dialogFormProps.elRef?.(form);
|
|
@@ -488,11 +500,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
488
500
|
type: "primary",
|
|
489
501
|
onClick: _cache[1] || (_cache[1] = ($event) => $setup.handlePlus(-1))
|
|
490
502
|
}, {
|
|
491
|
-
default: withCtx(() => _cache[
|
|
503
|
+
default: withCtx(() => _cache[6] || (_cache[6] = [
|
|
492
504
|
createTextVNode(" \u6DFB\u52A0 ")
|
|
493
505
|
])),
|
|
494
506
|
_: 1,
|
|
495
|
-
__: [
|
|
507
|
+
__: [6]
|
|
496
508
|
})
|
|
497
509
|
])) : createCommentVNode("v-if", true),
|
|
498
510
|
createVNode($setup["ElTable"], {
|
|
@@ -519,11 +531,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
519
531
|
icon: $setup.Plus,
|
|
520
532
|
onClick: _cache[0] || (_cache[0] = ($event) => $setup.handlePlus(-1))
|
|
521
533
|
}, {
|
|
522
|
-
default: withCtx(() => _cache[
|
|
534
|
+
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
523
535
|
createTextVNode(" \u6DFB\u52A0 ")
|
|
524
536
|
])),
|
|
525
537
|
_: 1,
|
|
526
|
-
__: [
|
|
538
|
+
__: [5]
|
|
527
539
|
}, 8, ["icon"])) : createCommentVNode("v-if", true)
|
|
528
540
|
]),
|
|
529
541
|
key: "0"
|
|
@@ -537,9 +549,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
537
549
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => $setup.cuState.dialogVisible = $event),
|
|
538
550
|
modelValue: $setup.cuState.data,
|
|
539
551
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.cuState.data = $event),
|
|
552
|
+
formdata: _ctx.formdata,
|
|
540
553
|
"form-items": $setup.cuFormItems,
|
|
541
554
|
"dialog-form-props": _ctx.dialogFormProps,
|
|
542
555
|
"validate-catch": _ctx.validateCatch,
|
|
556
|
+
"onUpdate:formdata": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("update:formdata", $event)),
|
|
543
557
|
onChange: $setup.handleDialogFormChange
|
|
544
558
|
}, {
|
|
545
559
|
header: withCtx(() => [
|
|
@@ -558,7 +572,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
558
572
|
]),
|
|
559
573
|
_: 1
|
|
560
574
|
/* STABLE */
|
|
561
|
-
}, 8, ["visible", "modelValue", "form-items", "dialog-form-props", "validate-catch"])
|
|
575
|
+
}, 8, ["visible", "modelValue", "formdata", "form-items", "dialog-form-props", "validate-catch"])
|
|
562
576
|
]),
|
|
563
577
|
_: 3
|
|
564
578
|
/* FORWARDED */
|
|
@@ -49,6 +49,13 @@ export declare const props: {
|
|
|
49
49
|
type: PropType<Modules[]>;
|
|
50
50
|
default: () => string[];
|
|
51
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* @description 正在编辑的 dialog 表单数据
|
|
54
|
+
*/
|
|
55
|
+
formdata: {
|
|
56
|
+
type: PropType<NormalObject>;
|
|
57
|
+
default: any;
|
|
58
|
+
};
|
|
52
59
|
required: {
|
|
53
60
|
readonly type: PropType<boolean>;
|
|
54
61
|
readonly required: false;
|
|
@@ -138,4 +145,5 @@ export declare const props: {
|
|
|
138
145
|
};
|
|
139
146
|
export declare const emits: {
|
|
140
147
|
'update:modelValue': any;
|
|
148
|
+
'update:formdata': any;
|
|
141
149
|
};
|
|
@@ -32,6 +32,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
32
32
|
suffix?: string;
|
|
33
33
|
}) => void;
|
|
34
34
|
};
|
|
35
|
+
formdata: any;
|
|
35
36
|
}>, {
|
|
36
37
|
props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
37
38
|
title: {
|
|
@@ -65,13 +66,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
65
66
|
suffix?: string;
|
|
66
67
|
}) => void;
|
|
67
68
|
};
|
|
69
|
+
formdata: any;
|
|
68
70
|
}>> & Readonly<{
|
|
69
71
|
"onUpdate:visible"?: (...args: any[]) => any;
|
|
70
72
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
71
73
|
onChange?: (...args: any[]) => any;
|
|
74
|
+
"onUpdate:formdata"?: (...args: any[]) => any;
|
|
72
75
|
}> & {}>;
|
|
73
|
-
emit: (event: "update:modelValue" | "change" | "update:visible", ...args: any[]) => void;
|
|
74
|
-
formData: import("vue").
|
|
76
|
+
emit: (event: "update:modelValue" | "change" | "update:formdata" | "update:visible", ...args: any[]) => void;
|
|
77
|
+
formData: import("vue").WritableComputedRef<{}, {}>;
|
|
75
78
|
formDef: {
|
|
76
79
|
_ref: import("vue").ShallowRef<{
|
|
77
80
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -6382,7 +6385,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
6382
6385
|
footer?(_: {}): any;
|
|
6383
6386
|
};
|
|
6384
6387
|
}) & import("vue").Plugin;
|
|
6385
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "update:visible")[], "update:modelValue" | "change" | "update:visible", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6388
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "update:formdata" | "update:visible")[], "update:modelValue" | "change" | "update:formdata" | "update:visible", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6386
6389
|
title: {
|
|
6387
6390
|
type: StringConstructor;
|
|
6388
6391
|
default: string;
|
|
@@ -6414,14 +6417,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
6414
6417
|
suffix?: string;
|
|
6415
6418
|
}) => void;
|
|
6416
6419
|
};
|
|
6420
|
+
formdata: any;
|
|
6417
6421
|
}>> & Readonly<{
|
|
6418
6422
|
"onUpdate:visible"?: (...args: any[]) => any;
|
|
6419
6423
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
6420
6424
|
onChange?: (...args: any[]) => any;
|
|
6425
|
+
"onUpdate:formdata"?: (...args: any[]) => any;
|
|
6421
6426
|
}>, {
|
|
6422
6427
|
visible: boolean;
|
|
6423
6428
|
modelValue: Record<string, any>;
|
|
6424
6429
|
formItems: unknown[];
|
|
6430
|
+
formdata: any;
|
|
6425
6431
|
title: string;
|
|
6426
6432
|
dialogFormProps: Record<string, any>;
|
|
6427
6433
|
validateCatch: AnyFunc;
|
|
@@ -38,6 +38,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
38
38
|
type: import("vue").PropType<import("./types").Modules[]>;
|
|
39
39
|
default: () => string[];
|
|
40
40
|
};
|
|
41
|
+
formdata: {
|
|
42
|
+
type: import("vue").PropType<NormalObject>;
|
|
43
|
+
default: any;
|
|
44
|
+
};
|
|
41
45
|
required: {
|
|
42
46
|
readonly type: import("vue").PropType<boolean>;
|
|
43
47
|
readonly required: false;
|
|
@@ -161,6 +165,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
161
165
|
type: import("vue").PropType<import("./types").Modules[]>;
|
|
162
166
|
default: () => string[];
|
|
163
167
|
};
|
|
168
|
+
formdata: {
|
|
169
|
+
type: import("vue").PropType<NormalObject>;
|
|
170
|
+
default: any;
|
|
171
|
+
};
|
|
164
172
|
required: {
|
|
165
173
|
readonly type: import("vue").PropType<boolean>;
|
|
166
174
|
readonly required: false;
|
|
@@ -249,8 +257,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
249
257
|
};
|
|
250
258
|
}>> & Readonly<{
|
|
251
259
|
"onUpdate:modelValue"?: (...args: any[] | unknown[]) => any;
|
|
260
|
+
"onUpdate:formdata"?: (...args: any[] | unknown[]) => any;
|
|
252
261
|
}> & {}>;
|
|
253
|
-
emit: ((event: "update:modelValue", ...args: unknown[]) => void) & ((event: "update:modelValue", ...args: any) => void) & ((event: "update:modelValue", ...args: any[]) => void);
|
|
262
|
+
emit: ((event: "update:modelValue", ...args: unknown[]) => void) & ((event: "update:modelValue", ...args: any) => void) & ((event: "update:modelValue", ...args: any[]) => void) & ((event: "update:formdata", ...args: unknown[]) => void) & ((event: "update:formdata", ...args: any) => void) & ((event: "update:formdata", ...args: any[]) => void);
|
|
254
263
|
ElTable: never;
|
|
255
264
|
hasColAdd: import("vue").ComputedRef<boolean>;
|
|
256
265
|
formItemBindProps: import("vue").ComputedRef<{}>;
|
|
@@ -1141,6 +1150,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1141
1150
|
suffix?: string;
|
|
1142
1151
|
}) => void;
|
|
1143
1152
|
};
|
|
1153
|
+
formdata: any;
|
|
1144
1154
|
}>, {
|
|
1145
1155
|
props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
1146
1156
|
title: {
|
|
@@ -1174,13 +1184,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1174
1184
|
suffix?: string;
|
|
1175
1185
|
}) => void;
|
|
1176
1186
|
};
|
|
1187
|
+
formdata: any;
|
|
1177
1188
|
}>> & Readonly<{
|
|
1178
1189
|
"onUpdate:visible"?: (...args: any[]) => any;
|
|
1179
1190
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
1180
1191
|
onChange?: (...args: any[]) => any;
|
|
1192
|
+
"onUpdate:formdata"?: (...args: any[]) => any;
|
|
1181
1193
|
}> & {}>;
|
|
1182
|
-
emit: (event: "update:modelValue" | "change" | "update:visible", ...args: any[]) => void;
|
|
1183
|
-
formData: import("vue").
|
|
1194
|
+
emit: (event: "update:modelValue" | "change" | "update:formdata" | "update:visible", ...args: any[]) => void;
|
|
1195
|
+
formData: import("vue").WritableComputedRef<{}, {}>;
|
|
1184
1196
|
formDef: {
|
|
1185
1197
|
_ref: import("vue").ShallowRef<{
|
|
1186
1198
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -7491,7 +7503,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
7491
7503
|
footer?(_: {}): any;
|
|
7492
7504
|
};
|
|
7493
7505
|
}) & import("vue").Plugin;
|
|
7494
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "update:visible")[], "update:modelValue" | "change" | "update:visible", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7506
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "update:formdata" | "update:visible")[], "update:modelValue" | "change" | "update:formdata" | "update:visible", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7495
7507
|
title: {
|
|
7496
7508
|
type: StringConstructor;
|
|
7497
7509
|
default: string;
|
|
@@ -7523,14 +7535,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
7523
7535
|
suffix?: string;
|
|
7524
7536
|
}) => void;
|
|
7525
7537
|
};
|
|
7538
|
+
formdata: any;
|
|
7526
7539
|
}>> & Readonly<{
|
|
7527
7540
|
"onUpdate:visible"?: (...args: any[]) => any;
|
|
7528
7541
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
7529
7542
|
onChange?: (...args: any[]) => any;
|
|
7543
|
+
"onUpdate:formdata"?: (...args: any[]) => any;
|
|
7530
7544
|
}>, {
|
|
7531
7545
|
visible: boolean;
|
|
7532
7546
|
modelValue: Record<string, any>;
|
|
7533
7547
|
formItems: unknown[];
|
|
7548
|
+
formdata: any;
|
|
7534
7549
|
title: string;
|
|
7535
7550
|
dialogFormProps: Record<string, any>;
|
|
7536
7551
|
validateCatch: import("@vunk/shared").AnyFunc;
|
|
@@ -7622,6 +7637,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
7622
7637
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7623
7638
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7624
7639
|
'update:modelValue': any;
|
|
7640
|
+
'update:formdata': any;
|
|
7625
7641
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7626
7642
|
columns: {
|
|
7627
7643
|
type: import("vue").PropType<any[]>;
|
|
@@ -7658,6 +7674,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
7658
7674
|
type: import("vue").PropType<import("./types").Modules[]>;
|
|
7659
7675
|
default: () => string[];
|
|
7660
7676
|
};
|
|
7677
|
+
formdata: {
|
|
7678
|
+
type: import("vue").PropType<NormalObject>;
|
|
7679
|
+
default: any;
|
|
7680
|
+
};
|
|
7661
7681
|
required: {
|
|
7662
7682
|
readonly type: import("vue").PropType<boolean>;
|
|
7663
7683
|
readonly required: false;
|
|
@@ -7746,6 +7766,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
7746
7766
|
};
|
|
7747
7767
|
}>> & Readonly<{
|
|
7748
7768
|
"onUpdate:modelValue"?: (...args: any[] | unknown[]) => any;
|
|
7769
|
+
"onUpdate:formdata"?: (...args: any[] | unknown[]) => any;
|
|
7749
7770
|
}>, {
|
|
7750
7771
|
required: boolean;
|
|
7751
7772
|
formItemSize: "default" | "small" | "large";
|
|
@@ -7768,6 +7789,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
7768
7789
|
labelActions: boolean;
|
|
7769
7790
|
splicable: boolean;
|
|
7770
7791
|
defaultItemValue: {};
|
|
7792
|
+
formdata: NormalObject;
|
|
7771
7793
|
dialogFormProps: Record<string, any>;
|
|
7772
7794
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7773
7795
|
export default _default;
|
|
@@ -9,6 +9,7 @@ var input = require('@vunk/form/components/input');
|
|
|
9
9
|
var _switch = require('@vunk/form/components/switch');
|
|
10
10
|
var select = require('@vunk/form/components/select');
|
|
11
11
|
var datePicker = require('@vunk/form/components/date-picker');
|
|
12
|
+
var timePicker = require('@vunk/form/components/time-picker');
|
|
12
13
|
var utilsObject = require('@vunk/core/shared/utils-object');
|
|
13
14
|
var inputNumber = require('@vunk/form/components/input-number');
|
|
14
15
|
var radio = require('@vunk/form/components/radio');
|
|
@@ -45,6 +46,7 @@ var _sfc_main = vue.defineComponent({
|
|
|
45
46
|
VkfSwitch: _switch.VkfSwitch,
|
|
46
47
|
VkfSelect: select.VkfSelect,
|
|
47
48
|
VkfDatePicker: datePicker.VkfDatePicker,
|
|
49
|
+
VkfTimePicker: timePicker.VkfTimePicker,
|
|
48
50
|
VkfInputNumber: inputNumber.VkfInputNumber,
|
|
49
51
|
VkfRadio: radio.VkfRadio,
|
|
50
52
|
VkfCheckbox: checkbox.VkfCheckbox,
|
|
@@ -76,6 +78,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
76
78
|
const _component_VkfSwitch = vue.resolveComponent("VkfSwitch");
|
|
77
79
|
const _component_VkfSelect = vue.resolveComponent("VkfSelect");
|
|
78
80
|
const _component_VkfDatePicker = vue.resolveComponent("VkfDatePicker");
|
|
81
|
+
const _component_VkfTimePicker = vue.resolveComponent("VkfTimePicker");
|
|
79
82
|
const _component_VkfInputNumber = vue.resolveComponent("VkfInputNumber");
|
|
80
83
|
const _component_VkfCascader = vue.resolveComponent("VkfCascader");
|
|
81
84
|
const _component_VkfSlider = vue.resolveComponent("VkfSlider");
|
|
@@ -161,6 +164,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
161
164
|
_: 1
|
|
162
165
|
/* STABLE */
|
|
163
166
|
}),
|
|
167
|
+
vue.createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfTimePicker" }, {
|
|
168
|
+
default: vue.withCtx(({ props, value, input }) => [
|
|
169
|
+
vue.createVNode(_component_VkfTimePicker, vue.mergeProps({ "model-value": value }, props, { "onUpdate:modelValue": input }), null, 16, ["model-value", "onUpdate:modelValue"])
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
/* STABLE */
|
|
173
|
+
}),
|
|
164
174
|
vue.createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfInputNumber" }, {
|
|
165
175
|
default: vue.withCtx(({ props, value, input }) => [
|
|
166
176
|
vue.createVNode(_component_VkfInputNumber, vue.mergeProps({ "model-value": value }, props, { "onUpdate:modelValue": input }), null, 16, ["model-value", "onUpdate:modelValue"])
|
|
@@ -5,6 +5,7 @@ import { VkfInput } from '@vunk/form/components/input';
|
|
|
5
5
|
import { VkfSwitch } from '@vunk/form/components/switch';
|
|
6
6
|
import { VkfSelect } from '@vunk/form/components/select';
|
|
7
7
|
import { VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
8
|
+
import { VkfTimePicker } from '@vunk/form/components/time-picker';
|
|
8
9
|
import { pickObject } from '@vunk/core/shared/utils-object';
|
|
9
10
|
import { VkfInputNumber } from '@vunk/form/components/input-number';
|
|
10
11
|
import { VkfRadio } from '@vunk/form/components/radio';
|
|
@@ -41,6 +42,7 @@ var _sfc_main = defineComponent({
|
|
|
41
42
|
VkfSwitch,
|
|
42
43
|
VkfSelect,
|
|
43
44
|
VkfDatePicker,
|
|
45
|
+
VkfTimePicker,
|
|
44
46
|
VkfInputNumber,
|
|
45
47
|
VkfRadio,
|
|
46
48
|
VkfCheckbox,
|
|
@@ -72,6 +74,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
72
74
|
const _component_VkfSwitch = resolveComponent("VkfSwitch");
|
|
73
75
|
const _component_VkfSelect = resolveComponent("VkfSelect");
|
|
74
76
|
const _component_VkfDatePicker = resolveComponent("VkfDatePicker");
|
|
77
|
+
const _component_VkfTimePicker = resolveComponent("VkfTimePicker");
|
|
75
78
|
const _component_VkfInputNumber = resolveComponent("VkfInputNumber");
|
|
76
79
|
const _component_VkfCascader = resolveComponent("VkfCascader");
|
|
77
80
|
const _component_VkfSlider = resolveComponent("VkfSlider");
|
|
@@ -157,6 +160,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
157
160
|
_: 1
|
|
158
161
|
/* STABLE */
|
|
159
162
|
}),
|
|
163
|
+
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfTimePicker" }, {
|
|
164
|
+
default: withCtx(({ props, value, input }) => [
|
|
165
|
+
createVNode(_component_VkfTimePicker, mergeProps({ "model-value": value }, props, { "onUpdate:modelValue": input }), null, 16, ["model-value", "onUpdate:modelValue"])
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
/* STABLE */
|
|
169
|
+
}),
|
|
160
170
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfInputNumber" }, {
|
|
161
171
|
default: withCtx(({ props, value, input }) => [
|
|
162
172
|
createVNode(_component_VkfInputNumber, mergeProps({ "model-value": value }, props, { "onUpdate:modelValue": input }), null, 16, ["model-value", "onUpdate:modelValue"])
|
|
@@ -93,6 +93,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
93
93
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
94
94
|
install(app: import("vue").App): void;
|
|
95
95
|
};
|
|
96
|
+
VkfTimePicker: {
|
|
97
|
+
new (...args: any[]): any;
|
|
98
|
+
__isFragment?: never;
|
|
99
|
+
__isTeleport?: never;
|
|
100
|
+
__isSuspense?: never;
|
|
101
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<Record<string | symbol, any>>>, Record<string | symbol, any>, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
102
|
+
[x: string]: any;
|
|
103
|
+
[x: symbol]: any;
|
|
104
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
105
|
+
install(app: import("vue").App): void;
|
|
106
|
+
};
|
|
96
107
|
VkfInputNumber: {
|
|
97
108
|
new (...args: any[]): any;
|
|
98
109
|
__isFragment?: never;
|
|
@@ -2,6 +2,7 @@ import { BasicSource } from '@vunk/form/shared';
|
|
|
2
2
|
import { __VkfButton } from '@vunk/form/components/button';
|
|
3
3
|
import { __VkfInput } from '@vunk/form/components/input';
|
|
4
4
|
import { __VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
5
|
+
import { __VkfTimePicker } from '@vunk/form/components/time-picker';
|
|
5
6
|
import { __VkfSelect } from '@vunk/form/components/select';
|
|
6
7
|
import { __VkfSwitch } from '@vunk/form/components/switch';
|
|
7
8
|
import { __VkfInputNumber } from '@vunk/form/components/input-number';
|
|
@@ -17,6 +18,7 @@ import { IntoUndefined, Func } from '@vunk/core';
|
|
|
17
18
|
export type VkfButtonSource<P = string> = __VkfButton.Source<P>;
|
|
18
19
|
export type VkfInputSource<P = string> = __VkfInput.Source<P>;
|
|
19
20
|
export type VkfDatePickerSource<P = string> = __VkfDatePicker.Source<P>;
|
|
21
|
+
export type VkfTimePickerSource<P = string> = __VkfTimePicker.Source<P>;
|
|
20
22
|
export type VkfSelectSource<P = string> = __VkfSelect.Source<P>;
|
|
21
23
|
export type VkfSwitchSource<P = string> = __VkfSwitch.Source<P>;
|
|
22
24
|
export type VkfInputNumberSource<P = string> = __VkfInputNumber.Source<P>;
|
|
@@ -32,7 +34,7 @@ export interface ComponentSource extends BasicSource {
|
|
|
32
34
|
templateType: 'Component';
|
|
33
35
|
is: any;
|
|
34
36
|
}
|
|
35
|
-
export type CoreSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | VkfInputNumberSource<P> | VkfRadioSource<P> | VkfCheckboxSource<P> | VkfUploadSource<P> | VkfColorPickerSource<P> | VkfButtonSource<P> | VkfCascaderSource<P> | VkfInputLinkSource<P> | VkfSliderSource<P> | VkfInputTagSource<P>;
|
|
37
|
+
export type CoreSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | VkfTimePickerSource<P> | VkfInputNumberSource<P> | VkfRadioSource<P> | VkfCheckboxSource<P> | VkfUploadSource<P> | VkfColorPickerSource<P> | VkfButtonSource<P> | VkfCascaderSource<P> | VkfInputLinkSource<P> | VkfSliderSource<P> | VkfInputTagSource<P>;
|
|
36
38
|
export type Source<P = string> = CoreSource<P> | ComponentSource;
|
|
37
39
|
/**
|
|
38
40
|
* @example
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var formItem = require('@vunk/form/components/form-item');
|
|
6
|
+
var elementPlus = require('@vunk/form/shared/element-plus');
|
|
7
|
+
var utilsVue = require('@vunk/core/shared/utils-vue');
|
|
8
|
+
var vue = require('vue');
|
|
9
|
+
var elementPlus$1 = require('element-plus');
|
|
10
|
+
var composables = require('@vunk/form/composables');
|
|
11
|
+
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
12
|
+
|
|
13
|
+
const props = {
|
|
14
|
+
...elementPlus.timePickerProps,
|
|
15
|
+
...formItem._VkfFormItemCtx.props,
|
|
16
|
+
timePickerSlots: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: void 0
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const createBindProps = utilsVue.bindPropsFactory(props);
|
|
22
|
+
const emits = {
|
|
23
|
+
...elementPlus.timePickerEmits
|
|
24
|
+
};
|
|
25
|
+
const createOnEmits = utilsVue.onEmitsFactory(emits);
|
|
26
|
+
|
|
27
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
28
|
+
__proto__: null,
|
|
29
|
+
createBindProps: createBindProps,
|
|
30
|
+
createOnEmits: createOnEmits,
|
|
31
|
+
emits: emits,
|
|
32
|
+
props: props
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
var _sfc_main = vue.defineComponent({
|
|
36
|
+
name: "VkfTimePicker",
|
|
37
|
+
components: {
|
|
38
|
+
VkfFormItem: formItem.VkfFormItem,
|
|
39
|
+
ElTimePicker: elementPlus$1.ElTimePicker
|
|
40
|
+
},
|
|
41
|
+
props,
|
|
42
|
+
emits,
|
|
43
|
+
setup(props2, { emit }) {
|
|
44
|
+
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
45
|
+
const timePickerBindProps = elementPlus.createTimePickerBindProps(props2, [
|
|
46
|
+
"readonly"
|
|
47
|
+
]);
|
|
48
|
+
const timePickerOnEmits = elementPlus.createTimePickerOnEmits(emit);
|
|
49
|
+
const readonly = composables.useComputedReadonly(props2);
|
|
50
|
+
return {
|
|
51
|
+
formItemBindProps,
|
|
52
|
+
timePickerBindProps,
|
|
53
|
+
timePickerOnEmits,
|
|
54
|
+
readonly
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
60
|
+
const _component_ElTimePicker = vue.resolveComponent("ElTimePicker");
|
|
61
|
+
const _component_VkfFormItem = vue.resolveComponent("VkfFormItem");
|
|
62
|
+
return vue.openBlock(), vue.createBlock(
|
|
63
|
+
_component_VkfFormItem,
|
|
64
|
+
vue.normalizeProps(vue.guardReactiveProps(_ctx.formItemBindProps)),
|
|
65
|
+
{
|
|
66
|
+
default: vue.withCtx(() => [
|
|
67
|
+
vue.createVNode(_component_ElTimePicker, vue.mergeProps(_ctx.timePickerBindProps, { readonly: _ctx.readonly }, vue.toHandlers(_ctx.timePickerOnEmits)), vue.createSlots({
|
|
68
|
+
_: 2
|
|
69
|
+
/* DYNAMIC */
|
|
70
|
+
}, [
|
|
71
|
+
vue.renderList(_ctx.timePickerSlots, (item, key) => {
|
|
72
|
+
return {
|
|
73
|
+
name: key,
|
|
74
|
+
fn: vue.withCtx((e) => [
|
|
75
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item?.(e))))
|
|
76
|
+
])
|
|
77
|
+
};
|
|
78
|
+
})
|
|
79
|
+
]), 1040, ["readonly"])
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
/* STABLE */
|
|
83
|
+
},
|
|
84
|
+
16
|
|
85
|
+
/* FULL_PROPS */
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
var VkfTimePicker = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/time-picker/src/index.vue"]]);
|
|
89
|
+
|
|
90
|
+
const timePickerEmits = {
|
|
91
|
+
"update:modelValue": null,
|
|
92
|
+
"change": null,
|
|
93
|
+
"focus": null,
|
|
94
|
+
"blur": null,
|
|
95
|
+
"visible-change": null,
|
|
96
|
+
"keydown": null
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
100
|
+
__proto__: null,
|
|
101
|
+
timePickerEmits: timePickerEmits
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
VkfTimePicker.install = (app) => {
|
|
105
|
+
app.component(
|
|
106
|
+
VkfTimePicker.name || "VkfTimePicker",
|
|
107
|
+
VkfTimePicker
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
exports.VkfTimePicker = VkfTimePicker;
|
|
112
|
+
exports._VkfTimePickerCtx = ctx;
|
|
113
|
+
exports.__VkfTimePicker = types;
|
|
114
|
+
exports.default = VkfTimePicker;
|