@vunk/form 0.0.0-alpha.5 → 0.0.0-alpha.8
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/config/index.js +1 -16
- package/components/config-renderer/index.js +1 -0
- package/components/confirm-input/index.css +9 -9
- package/components/confirm-input/index.js +33 -8
- package/components/confirm-input/src/ctx.d.ts +8 -1
- package/components/confirm-input/src/index.vue.d.ts +18 -2
- package/components/date-picker/index.d.ts +4 -0
- package/components/date-picker/index.js +81 -0
- package/components/date-picker/src/ctx.d.ts +131 -0
- package/components/date-picker/src/index.vue.d.ts +343 -0
- package/components/date-picker/src/types.d.ts +14 -0
- package/components/form/index.js +23 -2
- package/components/form/src/ctx.d.ts +277 -1
- package/components/form/src/index.vue.d.ts +825 -0
- package/components/form-item-renderer/index.js +1 -0
- package/components/ground/index.css +53 -53
- package/components/ground/index.js +140 -111
- package/components/ground/src/ground-config/src/index copy.vue.d.ts +72 -0
- package/components/ground/src/ground-config/src/index.vue.d.ts +953 -54
- package/components/ground/src/ground-main/src/index.vue.d.ts +10 -15
- package/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +13 -0
- package/components/ground/src/index.vue.d.ts +32 -10
- package/components/input/index.js +7 -7
- package/components/input-config/index.js +7 -4
- package/components/input-config/src/ctx.d.ts +600 -5
- package/components/input-config/src/index.vue.d.ts +2051 -2
- package/components/rules-config/src/ctx.d.ts +276 -0
- package/components/rules-config/src/index.vue.d.ts +1098 -0
- package/components/switch/src/ctx.d.ts +6 -0
- package/components/switch/src/index.vue.d.ts +13 -0
- package/full-entry/main.d.ts +1 -1
- package/index.css +62 -62
- package/index.d.ts +3 -1
- package/index.esm.js +1 -1
- package/package.json +1 -1
- package/shared/element-plus/ctx/index.d.ts +6 -4
- package/shared/element-plus/ctx/index.js +22 -2
- package/shared/element-plus/instances/date-picker.d.ts +94 -0
- package/shared/element-plus/instances/date-picker.js +21 -0
- package/shared/element-plus/instances/select.d.ts +1 -1
- package/shared/helper/index.d.ts +2 -1
- package/shared/helper/index.js +15 -1
- package/shared/types/form-item/confirm-input.d.ts +8 -0
- package/shared/types/form-item/confirm-input.js +1 -0
- package/shared/types/form-item/date-picker.d.ts +8 -0
- package/shared/types/form-item/date-picker.js +1 -0
- package/shared/types/form-item/index.d.ts +2 -0
- package/shared/types/form-item/input.d.ts +2 -6
- package/shared/types/form-item/select.d.ts +2 -2
- package/shared/types/form-item/switch.d.ts +2 -2
- package/shared/types/index.d.ts +2 -2
- package/shared/types/shared/index.d.ts +1 -1
- package/types/components/confirm-input/src/ctx.d.ts +8 -1
- package/types/components/confirm-input/src/index.vue.d.ts +18 -2
- package/types/components/date-picker/index.d.ts +4 -0
- package/types/components/date-picker/src/ctx.d.ts +131 -0
- package/types/components/date-picker/src/index.vue.d.ts +343 -0
- package/types/components/date-picker/src/types.d.ts +14 -0
- package/types/components/form/src/ctx.d.ts +277 -1
- package/types/components/form/src/index.vue.d.ts +825 -0
- package/types/components/ground/src/ground-config/src/index copy.vue.d.ts +72 -0
- package/types/components/ground/src/ground-config/src/index.vue.d.ts +953 -54
- package/types/components/ground/src/ground-main/src/index.vue.d.ts +10 -15
- package/types/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +13 -0
- package/types/components/ground/src/index.vue.d.ts +32 -10
- package/types/components/input-config/src/ctx.d.ts +600 -5
- package/types/components/input-config/src/index.vue.d.ts +2051 -2
- package/types/components/rules-config/src/ctx.d.ts +276 -0
- package/types/components/rules-config/src/index.vue.d.ts +1098 -0
- package/types/components/switch/src/ctx.d.ts +6 -0
- package/types/components/switch/src/index.vue.d.ts +13 -0
- package/types/full-entry/main.d.ts +1 -1
- package/types/shared/element-plus/ctx/index.d.ts +6 -4
- package/types/shared/element-plus/instances/date-picker.d.ts +94 -0
- package/types/shared/element-plus/instances/select.d.ts +1 -1
- package/types/shared/helper/index.d.ts +2 -1
- package/types/shared/types/form-item/confirm-input.d.ts +8 -0
- package/types/shared/types/form-item/date-picker.d.ts +8 -0
- package/types/shared/types/form-item/index.d.ts +2 -0
- package/types/shared/types/form-item/input.d.ts +2 -6
- package/types/shared/types/form-item/select.d.ts +2 -2
- package/types/shared/types/form-item/switch.d.ts +2 -2
- package/types/shared/types/index.d.ts +2 -2
- package/types/shared/types/shared/index.d.ts +1 -1
|
@@ -29,6 +29,12 @@ export declare const props: {
|
|
|
29
29
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
30
30
|
__epPropKey: true;
|
|
31
31
|
};
|
|
32
|
+
tabindex: {
|
|
33
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
34
|
+
readonly required: false;
|
|
35
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
36
|
+
__epPropKey: true;
|
|
37
|
+
};
|
|
32
38
|
label: StringConstructor;
|
|
33
39
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
34
40
|
prop: {
|
|
@@ -29,6 +29,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
30
30
|
__epPropKey: true;
|
|
31
31
|
};
|
|
32
|
+
tabindex: {
|
|
33
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
34
|
+
readonly required: false;
|
|
35
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
36
|
+
__epPropKey: true;
|
|
37
|
+
};
|
|
32
38
|
label: StringConstructor;
|
|
33
39
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
34
40
|
prop: {
|
|
@@ -74,6 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
80
|
disabled: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
75
81
|
id: string | undefined;
|
|
76
82
|
modelValue: import("element-plus/es/utils").EpPropMergeType<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
|
|
83
|
+
tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
|
|
77
84
|
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
78
85
|
width: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
79
86
|
inlinePrompt: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -129,6 +136,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
129
136
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
130
137
|
__epPropKey: true;
|
|
131
138
|
};
|
|
139
|
+
tabindex: {
|
|
140
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
141
|
+
readonly required: false;
|
|
142
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
143
|
+
__epPropKey: true;
|
|
144
|
+
};
|
|
132
145
|
label: StringConstructor;
|
|
133
146
|
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
134
147
|
prop: {
|
package/full-entry/main.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from '@vunk-form/components/input';
|
|
2
|
-
export * from '@vunk-form/components/ground';
|
|
3
2
|
export * from '@vunk-form/components/form-item-renderer';
|
|
4
3
|
export * from '@vunk-form/components/form-item-renderer-template';
|
|
5
4
|
export * from '@vunk-form/components/drag-wrapper';
|
|
@@ -15,3 +14,4 @@ export * from '@vunk-form/components/switch';
|
|
|
15
14
|
export * from '@vunk-form/components/form-item';
|
|
16
15
|
export * from '@vunk-form/components/select';
|
|
17
16
|
export * from '@vunk-form/components/select-config';
|
|
17
|
+
export * from '@vunk-form/components/date-picker';
|
package/index.css
CHANGED
|
@@ -1,46 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
.vkf-confirm-input .el-input-group__append {
|
|
3
|
-
cursor: initial;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.vkf-confirm-input .vkf-confirm-input-icon {
|
|
7
|
-
color: var(--el-color-primary);
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
}
|
|
10
1
|
|
|
2
|
+
.vkf-confirm-input .el-input-group__append {
|
|
3
|
+
cursor: initial;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.vkf-confirm-input .vkf-confirm-input-icon {
|
|
7
|
+
color: var(--el-color-primary);
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
.vkf-ground {
|
|
13
|
+
display: flex;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.vkf-ground-widget-x {
|
|
17
|
+
width: 15em;
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.vkf-ground-main-x {
|
|
22
|
+
flex: 3;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.vkf-ground-main-x .vkf-ground-main-card {
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.vkf-ground-main-card>.vk-card-title {
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: end;
|
|
32
|
+
margin-bottom: var(--gap-xxs);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.vkf-ground-main-card>.vk-card-body {
|
|
36
|
+
height: 100%;
|
|
37
|
+
border: 2px var(--el-border-color) dashed;
|
|
38
|
+
overflow: auto;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.vkf-ground-config-x {
|
|
42
|
+
padding: 0 1em;
|
|
43
|
+
flex: 1;
|
|
44
|
+
}
|
|
11
45
|
|
|
12
|
-
.vkf-
|
|
46
|
+
.vkf-widget-tab{
|
|
47
|
+
position: relative;
|
|
48
|
+
width: 100%;
|
|
13
49
|
display: flex;
|
|
50
|
+
justify-content: space-around;
|
|
51
|
+
--vk-float-block-color: var(--el-color-primary);
|
|
14
52
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
width: 15em;
|
|
18
|
-
height: 100%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.vkf-ground-main-x {
|
|
22
|
-
flex: 3;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.vkf-ground-main-x .vkf-ground-main-card {
|
|
26
|
-
height: 100%;
|
|
53
|
+
.vkf-widget-tab > .is-active.vk-tab-item{
|
|
54
|
+
color: var(--el-color-primary);
|
|
27
55
|
}
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: end;
|
|
32
|
-
margin-bottom: var(--gap-xxs);
|
|
56
|
+
.vkf-widget-tab > .vk-tab-item {
|
|
57
|
+
padding: 0.5em 1em;
|
|
33
58
|
}
|
|
34
59
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
/* for FormItemWidget */
|
|
61
|
+
.vkf-ground-widget-ul {
|
|
62
|
+
display: grid;
|
|
63
|
+
grid: auto-flow / repeat(2, 1fr);
|
|
39
64
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
65
|
+
.vkf-ground-widget-ul li{
|
|
66
|
+
text-align: center;
|
|
67
|
+
margin: 0.25em .5em;
|
|
68
|
+
background: var(--el-color-info-light-8);
|
|
69
|
+
cursor: move;
|
|
70
|
+
border-radius: 4px;
|
|
44
71
|
}
|
|
45
72
|
|
|
46
73
|
.vkf-ground-main {
|
|
@@ -69,33 +96,6 @@
|
|
|
69
96
|
padding: 1em .5em 0;
|
|
70
97
|
}
|
|
71
98
|
|
|
72
|
-
.vkf-widget-tab{
|
|
73
|
-
position: relative;
|
|
74
|
-
width: 100%;
|
|
75
|
-
display: flex;
|
|
76
|
-
justify-content: space-around;
|
|
77
|
-
--vk-float-block-color: var(--el-color-primary);
|
|
78
|
-
}
|
|
79
|
-
.vkf-widget-tab > .is-active.vk-tab-item{
|
|
80
|
-
color: var(--el-color-primary);
|
|
81
|
-
}
|
|
82
|
-
.vkf-widget-tab > .vk-tab-item {
|
|
83
|
-
padding: 0.5em 1em;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* for FormItemWidget */
|
|
87
|
-
.vkf-ground-widget-ul {
|
|
88
|
-
display: grid;
|
|
89
|
-
grid: auto-flow / repeat(2, 1fr);
|
|
90
|
-
}
|
|
91
|
-
.vkf-ground-widget-ul li{
|
|
92
|
-
text-align: center;
|
|
93
|
-
margin: 0.25em .5em;
|
|
94
|
-
background: var(--el-color-info-light-8);
|
|
95
|
-
cursor: move;
|
|
96
|
-
border-radius: 4px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
99
|
.vkf-ground-main-editing-wrapper{
|
|
100
100
|
overflow: hidden;
|
|
101
101
|
position: relative;
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
export * from '@vunk/form/components/input'
|
|
3
3
|
|
|
4
|
-
export * from '@vunk/form/components/ground'
|
|
4
|
+
// export * from '@vunk/form/components/ground'
|
|
5
5
|
|
|
6
6
|
export * from '@vunk/form/components/form-item-renderer'
|
|
7
7
|
|
|
@@ -32,3 +32,5 @@ export * from '@vunk/form/components/form-item'
|
|
|
32
32
|
export * from '@vunk/form/components/select'
|
|
33
33
|
|
|
34
34
|
export * from '@vunk/form/components/select-config'
|
|
35
|
+
|
|
36
|
+
export * from '@vunk/form/components/date-picker'
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from '@vunk/form/components/input';
|
|
2
|
-
export * from '@vunk/form/components/ground';
|
|
3
2
|
export * from '@vunk/form/components/form-item-renderer';
|
|
4
3
|
export * from '@vunk/form/components/form-item-renderer-template';
|
|
5
4
|
export * from '@vunk/form/components/drag-wrapper';
|
|
@@ -15,3 +14,4 @@ export * from '@vunk/form/components/switch';
|
|
|
15
14
|
export * from '@vunk/form/components/form-item';
|
|
16
15
|
export * from '@vunk/form/components/select';
|
|
17
16
|
export * from '@vunk/form/components/select-config';
|
|
17
|
+
export * from '@vunk/form/components/date-picker';
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export declare const createInputBindProps: <T2 extends Record<string, any>, EX extends ("type" | "size" | "label" | "
|
|
1
|
+
export declare const createInputBindProps: <T2 extends Record<string, any>, EX extends ("type" | "size" | "label" | "disabled" | "id" | "modelValue" | "resize" | "autosize" | "autocomplete" | "formatter" | "parser" | "placeholder" | "form" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "suffixIcon" | "prefixIcon" | "containerRole" | "tabindex" | "validateEvent" | "inputStyle")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "type" | "size" | "label" | "disabled" | "id" | "modelValue" | "resize" | "autosize" | "autocomplete" | "formatter" | "parser" | "placeholder" | "form" | "readonly" | "clearable" | "showPassword" | "showWordLimit" | "suffixIcon" | "prefixIcon" | "containerRole" | "tabindex" | "validateEvent" | "inputStyle">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
|
|
2
2
|
export declare const createInputOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "input" | "change" | "focus" | "blur" | "clear" | "mouseleave" | "mouseenter" | "keydown" | "compositionstart" | "compositionupdate" | "compositionend")[], K extends "update:modelValue" | "input" | "change" | "focus" | "blur" | "clear" | "mouseleave" | "mouseenter" | "keydown" | "compositionstart" | "compositionupdate" | "compositionend">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
|
|
3
|
-
export declare const createFormBindProps: <T2 extends Record<string, any>, EX extends ("size" | "labelWidth" | "rules" | "inlineMessage" | "showMessage" | "
|
|
3
|
+
export declare const createFormBindProps: <T2 extends Record<string, any>, EX extends ("size" | "labelWidth" | "rules" | "inlineMessage" | "showMessage" | "model" | "labelPosition" | "labelSuffix" | "inline" | "statusIcon" | "disabled" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "size" | "labelWidth" | "rules" | "inlineMessage" | "showMessage" | "model" | "labelPosition" | "labelSuffix" | "inline" | "statusIcon" | "disabled" | "validateOnRuleChange" | "hideRequiredAsterisk" | "scrollToError">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
|
|
4
4
|
export declare const createFormOnEmits: <T2 extends (...args: any) => any, EX extends "validate"[], K extends "validate">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
|
|
5
5
|
export declare const createFormItemBindProps: <T2 extends Record<string, any>, EX extends ("required" | "prop" | "size" | "label" | "labelWidth" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "required" | "prop" | "size" | "label" | "labelWidth" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
|
|
6
|
-
export declare const createSwitchBindProps: <T2 extends Record<string, any>, EX extends ("size" | "value" | "id" | "
|
|
6
|
+
export declare const createSwitchBindProps: <T2 extends Record<string, any>, EX extends ("size" | "disabled" | "value" | "id" | "modelValue" | "tabindex" | "validateEvent" | "width" | "inlinePrompt" | "activeIcon" | "inactiveIcon" | "activeText" | "inactiveText" | "activeColor" | "inactiveColor" | "borderColor" | "activeValue" | "inactiveValue" | "name" | "loading" | "beforeChange")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "size" | "disabled" | "value" | "id" | "modelValue" | "tabindex" | "validateEvent" | "width" | "inlinePrompt" | "activeIcon" | "inactiveIcon" | "activeText" | "inactiveText" | "activeColor" | "inactiveColor" | "borderColor" | "activeValue" | "inactiveValue" | "name" | "loading" | "beforeChange">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
|
|
7
7
|
export declare const createSwitchOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "input" | "change")[], K extends "update:modelValue" | "input" | "change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
|
|
8
|
-
export declare const createSelectBindProps: <T2 extends Record<string, any>, EX extends ("size" | "
|
|
8
|
+
export declare const createSelectBindProps: <T2 extends Record<string, any>, EX extends ("size" | "disabled" | "id" | "modelValue" | "autocomplete" | "placeholder" | "clearable" | "suffixIcon" | "name" | "loading" | "automaticDropdown" | "effect" | "filterable" | "allowCreate" | "popperClass" | "remote" | "loadingText" | "noMatchText" | "noDataText" | "remoteMethod" | "filterMethod" | "multiple" | "multipleLimit" | "defaultFirstOption" | "reserveKeyword" | "valueKey" | "collapseTags" | "collapseTagsTooltip" | "teleported" | "persistent" | "clearIcon" | "fitInputWidth" | "tagType")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "size" | "disabled" | "id" | "modelValue" | "autocomplete" | "placeholder" | "clearable" | "suffixIcon" | "name" | "loading" | "automaticDropdown" | "effect" | "filterable" | "allowCreate" | "popperClass" | "remote" | "loadingText" | "noMatchText" | "noDataText" | "remoteMethod" | "filterMethod" | "multiple" | "multipleLimit" | "defaultFirstOption" | "reserveKeyword" | "valueKey" | "collapseTags" | "collapseTagsTooltip" | "teleported" | "persistent" | "clearIcon" | "fitInputWidth" | "tagType">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
|
|
9
9
|
export declare const createSelectOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "change" | "focus" | "blur" | "clear" | "remove-tag" | "visible-change")[], K extends "update:modelValue" | "change" | "focus" | "blur" | "clear" | "remove-tag" | "visible-change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
|
|
10
|
+
export declare const createDatePickerBindProps: <T2 extends Record<string, any>, EX extends ("type" | "size" | "label" | "disabled" | "id" | "modelValue" | "placeholder" | "readonly" | "clearable" | "prefixIcon" | "tabindex" | "validateEvent" | "name" | "popperClass" | "clearIcon" | "format" | "valueFormat" | "editable" | "popperOptions" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels")[] | undefined, K extends Extract<EX extends (infer V)[] ? Exclude<keyof T2, V> : keyof T2, "type" | "size" | "label" | "disabled" | "id" | "modelValue" | "placeholder" | "readonly" | "clearable" | "prefixIcon" | "tabindex" | "validateEvent" | "name" | "popperClass" | "clearIcon" | "format" | "valueFormat" | "editable" | "popperOptions" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels">>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [k in K]: T2[k]; }>;
|
|
11
|
+
export declare const createDatePickerOnEmits: <T2 extends (...args: any) => any, EX extends ("update:modelValue" | "change" | "focus" | "blur" | "keydown" | "visible-change" | "calendar-change" | "panel-change")[], K extends "update:modelValue" | "change" | "focus" | "blur" | "keydown" | "visible-change" | "calendar-change" | "panel-change">(emit: T2, excludes?: EX | undefined) => { [k in K]: T2; };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useTooltipContentProps, tagProps, inputProps, inputEmits, formProps, formEmits, formItemProps, switchProps, switchEmits } from 'element-plus';
|
|
1
|
+
import { useTooltipContentProps, tagProps, timePickerDefaultProps, inputProps, inputEmits, formProps, formEmits, formItemProps, switchProps, switchEmits } from 'element-plus';
|
|
2
2
|
import { bindPropsFactory, onEmitsFactory } from 'vunk/shared/utils-vue';
|
|
3
3
|
import { defineComponent, openBlock, createElementBlock, createElementVNode } from 'vue';
|
|
4
4
|
|
|
@@ -1262,6 +1262,24 @@ const selectEmits = {
|
|
|
1262
1262
|
"blur": null
|
|
1263
1263
|
};
|
|
1264
1264
|
|
|
1265
|
+
const datePickerProps = {
|
|
1266
|
+
...timePickerDefaultProps,
|
|
1267
|
+
type: {
|
|
1268
|
+
type: String,
|
|
1269
|
+
default: "date"
|
|
1270
|
+
}
|
|
1271
|
+
};
|
|
1272
|
+
const datePickerEmits = {
|
|
1273
|
+
"update:modelValue": null,
|
|
1274
|
+
"change": null,
|
|
1275
|
+
"focus": null,
|
|
1276
|
+
"blur": null,
|
|
1277
|
+
"calendar-change": null,
|
|
1278
|
+
"panel-change": null,
|
|
1279
|
+
"visible-change": null,
|
|
1280
|
+
"keydown": null
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1265
1283
|
const createInputBindProps = bindPropsFactory(inputProps);
|
|
1266
1284
|
const createInputOnEmits = onEmitsFactory(inputEmits);
|
|
1267
1285
|
const createFormBindProps = bindPropsFactory(formProps);
|
|
@@ -1271,5 +1289,7 @@ const createSwitchBindProps = bindPropsFactory(switchProps);
|
|
|
1271
1289
|
const createSwitchOnEmits = onEmitsFactory(switchEmits);
|
|
1272
1290
|
const createSelectBindProps = bindPropsFactory(selectProps);
|
|
1273
1291
|
const createSelectOnEmits = onEmitsFactory(selectEmits);
|
|
1292
|
+
const createDatePickerBindProps = bindPropsFactory(datePickerProps);
|
|
1293
|
+
const createDatePickerOnEmits = onEmitsFactory(datePickerEmits);
|
|
1274
1294
|
|
|
1275
|
-
export { createFormBindProps, createFormItemBindProps, createFormOnEmits, createInputBindProps, createInputOnEmits, createSelectBindProps, createSelectOnEmits, createSwitchBindProps, createSwitchOnEmits };
|
|
1295
|
+
export { createDatePickerBindProps, createDatePickerOnEmits, createFormBindProps, createFormItemBindProps, createFormOnEmits, createInputBindProps, createInputOnEmits, createSelectBindProps, createSelectOnEmits, createSwitchBindProps, createSwitchOnEmits };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export declare const datePickerProps: {
|
|
3
|
+
type: {
|
|
4
|
+
type: PropType<"year" | "month" | "date" | "dates" | "week" | "datetime" | "datetimerange" | "daterange" | "monthrange">;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
id: {
|
|
8
|
+
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown>>;
|
|
9
|
+
readonly required: false;
|
|
10
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
11
|
+
__epPropKey: true;
|
|
12
|
+
};
|
|
13
|
+
name: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown, "", boolean>;
|
|
14
|
+
popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
15
|
+
format: StringConstructor;
|
|
16
|
+
valueFormat: StringConstructor;
|
|
17
|
+
clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
18
|
+
clearIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, import("vue").DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, boolean>;
|
|
19
|
+
editable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
20
|
+
prefixIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "", boolean>;
|
|
21
|
+
size: {
|
|
22
|
+
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
23
|
+
readonly required: false;
|
|
24
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
25
|
+
__epPropKey: true;
|
|
26
|
+
};
|
|
27
|
+
readonly: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
28
|
+
disabled: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
29
|
+
placeholder: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
30
|
+
popperOptions: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>) | ((new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>))[], unknown, unknown, () => {}, boolean>;
|
|
31
|
+
modelValue: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").ModelValueType & {}) | (() => import("element-plus").ModelValueType) | ((new (...args: any[]) => import("element-plus").ModelValueType & {}) | (() => import("element-plus").ModelValueType))[], unknown, unknown, "", boolean>;
|
|
32
|
+
rangeSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
|
33
|
+
startPlaceholder: StringConstructor;
|
|
34
|
+
endPlaceholder: StringConstructor;
|
|
35
|
+
defaultValue: {
|
|
36
|
+
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
37
|
+
readonly required: false;
|
|
38
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
39
|
+
__epPropKey: true;
|
|
40
|
+
};
|
|
41
|
+
defaultTime: {
|
|
42
|
+
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
43
|
+
readonly required: false;
|
|
44
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
45
|
+
__epPropKey: true;
|
|
46
|
+
};
|
|
47
|
+
isRange: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
48
|
+
disabledHours: {
|
|
49
|
+
readonly type: PropType<Function>;
|
|
50
|
+
readonly required: false;
|
|
51
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
52
|
+
__epPropKey: true;
|
|
53
|
+
};
|
|
54
|
+
disabledMinutes: {
|
|
55
|
+
readonly type: PropType<Function>;
|
|
56
|
+
readonly required: false;
|
|
57
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
58
|
+
__epPropKey: true;
|
|
59
|
+
};
|
|
60
|
+
disabledSeconds: {
|
|
61
|
+
readonly type: PropType<Function>;
|
|
62
|
+
readonly required: false;
|
|
63
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
64
|
+
__epPropKey: true;
|
|
65
|
+
};
|
|
66
|
+
disabledDate: {
|
|
67
|
+
readonly type: PropType<Function>;
|
|
68
|
+
readonly required: false;
|
|
69
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
70
|
+
__epPropKey: true;
|
|
71
|
+
};
|
|
72
|
+
cellClassName: {
|
|
73
|
+
readonly type: PropType<Function>;
|
|
74
|
+
readonly required: false;
|
|
75
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
76
|
+
__epPropKey: true;
|
|
77
|
+
};
|
|
78
|
+
shortcuts: import("element-plus/es/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
79
|
+
arrowControl: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
80
|
+
label: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
81
|
+
tabindex: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown, 0, boolean>;
|
|
82
|
+
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
83
|
+
unlinkPanels: BooleanConstructor;
|
|
84
|
+
};
|
|
85
|
+
export declare const datePickerEmits: {
|
|
86
|
+
'update:modelValue': null;
|
|
87
|
+
change: null;
|
|
88
|
+
focus: null;
|
|
89
|
+
blur: null;
|
|
90
|
+
'calendar-change': null;
|
|
91
|
+
'panel-change': null;
|
|
92
|
+
'visible-change': null;
|
|
93
|
+
keydown: null;
|
|
94
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { timePickerDefaultProps } from 'element-plus';
|
|
2
|
+
|
|
3
|
+
const datePickerProps = {
|
|
4
|
+
...timePickerDefaultProps,
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "date"
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
const datePickerEmits = {
|
|
11
|
+
"update:modelValue": null,
|
|
12
|
+
"change": null,
|
|
13
|
+
"focus": null,
|
|
14
|
+
"blur": null,
|
|
15
|
+
"calendar-change": null,
|
|
16
|
+
"panel-change": null,
|
|
17
|
+
"visible-change": null,
|
|
18
|
+
"keydown": null
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { datePickerEmits, datePickerProps };
|
|
@@ -3,7 +3,7 @@ export declare const selectProps: {
|
|
|
3
3
|
name: StringConstructor;
|
|
4
4
|
id: StringConstructor;
|
|
5
5
|
modelValue: {
|
|
6
|
-
type: (BooleanConstructor | StringConstructor | NumberConstructor | ObjectConstructor
|
|
6
|
+
type: (ArrayConstructor | BooleanConstructor | StringConstructor | NumberConstructor | ObjectConstructor)[];
|
|
7
7
|
default: undefined;
|
|
8
8
|
};
|
|
9
9
|
autocomplete: {
|
package/shared/helper/index.d.ts
CHANGED
package/shared/helper/index.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { setData as setData$1 } from 'vunk/shared/helper';
|
|
2
|
+
export { getValue, unsetData } from 'vunk/shared/helper';
|
|
3
|
+
|
|
4
|
+
const setData = (obj, e) => {
|
|
5
|
+
if (Array.isArray(e.k)) {
|
|
6
|
+
setData$1(obj, {
|
|
7
|
+
...e,
|
|
8
|
+
k: e.k.flat(Infinity)
|
|
9
|
+
});
|
|
10
|
+
} else {
|
|
11
|
+
setData$1(obj, e);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { setData };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VkfConfirmInput } from '@vunk/form/components/confirm-input';
|
|
2
|
+
import { VueComponentPropsType } from 'vunk/shared/types';
|
|
3
|
+
import { Merge } from '../shared';
|
|
4
|
+
export declare type VkfConfirmInputProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfConfirmInput>, T>;
|
|
5
|
+
export declare type VkfConfirmInputSource<P = string> = VkfConfirmInputProps<{
|
|
6
|
+
prop: P;
|
|
7
|
+
templateType: 'VkfConfirmInput';
|
|
8
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
2
|
+
import { VueComponentPropsType } from 'vunk/shared/types';
|
|
3
|
+
import { Merge } from '../shared';
|
|
4
|
+
export declare type VkfDatePickerProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfDatePicker>, T>;
|
|
5
|
+
export declare type VkfDatePickerSource<P = string> = VkfDatePickerProps<{
|
|
6
|
+
prop: P;
|
|
7
|
+
templateType: 'VkfDatePicker';
|
|
8
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { VkfInput } from '@vunk/form/components/input';
|
|
2
2
|
import { VueComponentPropsType } from 'vunk/shared/types';
|
|
3
|
-
import {
|
|
4
|
-
export declare type VkfInputProps<T = undefined> =
|
|
3
|
+
import { Merge } from '../shared';
|
|
4
|
+
export declare type VkfInputProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfInput>, T>;
|
|
5
5
|
export declare type VkfInputSource<P = string> = VkfInputProps<{
|
|
6
6
|
prop: P;
|
|
7
7
|
templateType: 'VkfInput';
|
|
8
8
|
}>;
|
|
9
|
-
export declare type VkfConfirmInputSource<P = string> = VkfInputProps<{
|
|
10
|
-
prop: P;
|
|
11
|
-
templateType: 'VkfConfirmInput';
|
|
12
|
-
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VkfSelect } from '@vunk/form/components/select';
|
|
2
2
|
import { VueComponentPropsType } from 'vunk/shared/types';
|
|
3
|
-
import {
|
|
4
|
-
export declare type VkfSelectProps<T = undefined> =
|
|
3
|
+
import { Merge } from '../shared';
|
|
4
|
+
export declare type VkfSelectProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfSelect>, T>;
|
|
5
5
|
export declare type VkfSelectSource<P = string> = VkfSelectProps<{
|
|
6
6
|
prop: P;
|
|
7
7
|
templateType: 'VkfSelect';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VkfSwitch } from '@vunk/form/components/switch';
|
|
2
2
|
import { VueComponentPropsType } from 'vunk/shared/types';
|
|
3
|
-
import {
|
|
4
|
-
export declare type VkfSwitchProps<T = undefined> =
|
|
3
|
+
import { Merge } from '../shared';
|
|
4
|
+
export declare type VkfSwitchProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfSwitch>, T>;
|
|
5
5
|
export declare type VkfSwitchSource<P = string> = VkfSwitchProps<{
|
|
6
6
|
prop: P;
|
|
7
7
|
templateType: 'VkfSwitch';
|
package/shared/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { VkfInputSource, VkfSwitchSource, VkfSelectSource } from './form-item';
|
|
1
|
+
import { VkfInputSource, VkfSwitchSource, VkfSelectSource, VkfDatePickerSource } from './form-item';
|
|
2
2
|
export * from './shared';
|
|
3
|
-
export declare type FormItemRendererSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P>;
|
|
3
|
+
export declare type FormItemRendererSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type Func<A = any, R = any> = A extends any[] ? (...args: A) => R : (arg: A) => R;
|
|
2
|
-
export declare type
|
|
2
|
+
export declare type Merge<A extends Record<string, any>, B> = B extends Record<string, any> ? (Omit<A, keyof B> & B) : A;
|
|
3
3
|
export declare type SetDataEvent<K = any> = {
|
|
4
4
|
k: K;
|
|
5
5
|
v: any;
|
|
@@ -7,6 +7,14 @@ export declare const props: {
|
|
|
7
7
|
}>;
|
|
8
8
|
default: () => {};
|
|
9
9
|
};
|
|
10
|
+
disabled: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
validateUpdate: {
|
|
15
|
+
type: PropType<(v?: any) => boolean | undefined>;
|
|
16
|
+
default: () => () => boolean;
|
|
17
|
+
};
|
|
10
18
|
inputSlots: {
|
|
11
19
|
type: PropType<import("../../input/src/types").InputSlots>;
|
|
12
20
|
default: undefined;
|
|
@@ -18,7 +26,6 @@ export declare const props: {
|
|
|
18
26
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
19
27
|
__epPropKey: true;
|
|
20
28
|
};
|
|
21
|
-
disabled: BooleanConstructor;
|
|
22
29
|
modelValue: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown, "", boolean>;
|
|
23
30
|
type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "text", boolean>;
|
|
24
31
|
resize: {
|