@vunk/form 0.0.0-alpha.5 → 0.0.0-alpha.6
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/confirm-input/index.css +9 -9
- 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 +163 -0
- package/components/date-picker/src/index.vue.d.ts +407 -0
- package/components/date-picker/src/types.d.ts +14 -0
- package/components/form/index.js +16 -1
- package/components/ground/index.css +53 -53
- package/components/ground/index.js +25 -18
- package/components/ground/src/ground-main/src/index.vue.d.ts +5 -1
- package/components/ground/src/index.vue.d.ts +18 -7
- package/full-entry/main.d.ts +1 -0
- package/index.css +62 -62
- package/index.d.ts +2 -0
- package/index.esm.js +1 -0
- package/package.json +1 -1
- package/shared/element-plus/ctx/index.d.ts +2 -0
- package/shared/element-plus/ctx/index.js +22 -2
- package/shared/element-plus/instances/date-picker.d.ts +126 -0
- package/shared/element-plus/instances/date-picker.js +21 -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 +1 -0
- package/shared/types/index.d.ts +2 -2
- package/types/components/date-picker/index.d.ts +4 -0
- package/types/components/date-picker/src/ctx.d.ts +163 -0
- package/types/components/date-picker/src/index.vue.d.ts +407 -0
- package/types/components/date-picker/src/types.d.ts +14 -0
- package/types/components/ground/src/ground-main/src/index.vue.d.ts +5 -1
- package/types/components/ground/src/index.vue.d.ts +18 -7
- package/types/full-entry/main.d.ts +1 -0
- package/types/shared/element-plus/ctx/index.d.ts +2 -0
- package/types/shared/element-plus/instances/date-picker.d.ts +126 -0
- package/types/shared/types/form-item/date-picker.d.ts +8 -0
- package/types/shared/types/form-item/index.d.ts +1 -0
- package/types/shared/types/index.d.ts +2 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Func } from '@vunk/form/shared/types';
|
|
2
|
+
export declare type DatePickerSlots = {
|
|
3
|
+
default?: Func;
|
|
4
|
+
'range-separator'?: Func;
|
|
5
|
+
};
|
|
6
|
+
export declare const datePickerEmits: {
|
|
7
|
+
'update:modelValue': null;
|
|
8
|
+
change: null;
|
|
9
|
+
focus: null;
|
|
10
|
+
blur: null;
|
|
11
|
+
'calendar-change': null;
|
|
12
|
+
'panel-change': null;
|
|
13
|
+
'visible-change': null;
|
|
14
|
+
};
|
package/components/form/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { createFormBindProps, createFormOnEmits } from '@vunk/form/shared/elemen
|
|
|
8
8
|
import { getValue } from '@vunk/form/shared/helper';
|
|
9
9
|
import { VkfSwitch } from '@vunk/form/components/switch';
|
|
10
10
|
import { VkfSelect } from '@vunk/form/components/select';
|
|
11
|
+
import { VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
11
12
|
|
|
12
13
|
const props = {
|
|
13
14
|
...formProps,
|
|
@@ -45,7 +46,8 @@ var script = defineComponent({
|
|
|
45
46
|
VkfFormItemRendererTemplate,
|
|
46
47
|
VkfInput,
|
|
47
48
|
VkfSwitch,
|
|
48
|
-
VkfSelect
|
|
49
|
+
VkfSelect,
|
|
50
|
+
VkfDatePicker
|
|
49
51
|
},
|
|
50
52
|
setup(props2, { emit }) {
|
|
51
53
|
const formProps = createFormBindProps(props2, ["model"]);
|
|
@@ -63,6 +65,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
63
65
|
const _component_VkfFormItemRendererTemplate = resolveComponent("VkfFormItemRendererTemplate");
|
|
64
66
|
const _component_VkfSwitch = resolveComponent("VkfSwitch");
|
|
65
67
|
const _component_VkfSelect = resolveComponent("VkfSelect");
|
|
68
|
+
const _component_VkfDatePicker = resolveComponent("VkfDatePicker");
|
|
66
69
|
const _component_VkfFormItemRenderer = resolveComponent("VkfFormItemRenderer");
|
|
67
70
|
const _component_ElForm = resolveComponent("ElForm");
|
|
68
71
|
return openBlock(), createBlock(_component_ElForm, mergeProps(_ctx.formProps, toHandlers(_ctx.formEmits), {
|
|
@@ -107,6 +110,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
110
|
]),
|
|
108
111
|
_: 1
|
|
109
112
|
}),
|
|
113
|
+
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfDatePicker" }, {
|
|
114
|
+
default: withCtx(({ data: sourceData }) => [
|
|
115
|
+
createVNode(_component_VkfDatePicker, mergeProps({
|
|
116
|
+
modelValue: _ctx.getValue(_ctx.data, sourceData.prop),
|
|
117
|
+
"onUpdate:modelValue": ($event) => _ctx.$emit("setData", {
|
|
118
|
+
k: sourceData.prop,
|
|
119
|
+
v: $event
|
|
120
|
+
})
|
|
121
|
+
}, sourceData), null, 16, ["modelValue", "onUpdate:modelValue"])
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
}),
|
|
110
125
|
renderSlot(_ctx.$slots, "rendererTemplate")
|
|
111
126
|
]),
|
|
112
127
|
_: 3
|
|
@@ -1,36 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
.vkf-ground {
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.vkf-ground-widget-x {
|
|
7
|
+
width: 15em;
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.vkf-ground-main-x {
|
|
12
|
+
flex: 3;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.vkf-ground-main-x .vkf-ground-main-card {
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.vkf-ground-main-card>.vk-card-title {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: end;
|
|
22
|
+
margin-bottom: var(--gap-xxs);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.vkf-ground-main-card>.vk-card-body {
|
|
26
|
+
height: 100%;
|
|
27
|
+
border: 2px var(--el-border-color) dashed;
|
|
28
|
+
overflow: auto;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.vkf-ground-config-x {
|
|
32
|
+
padding: 0 1em;
|
|
33
|
+
flex: 1;
|
|
34
|
+
}
|
|
1
35
|
|
|
2
|
-
.vkf-
|
|
36
|
+
.vkf-widget-tab{
|
|
37
|
+
position: relative;
|
|
38
|
+
width: 100%;
|
|
3
39
|
display: flex;
|
|
40
|
+
justify-content: space-around;
|
|
41
|
+
--vk-float-block-color: var(--el-color-primary);
|
|
4
42
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
width: 15em;
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.vkf-ground-main-x {
|
|
12
|
-
flex: 3;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.vkf-ground-main-x .vkf-ground-main-card {
|
|
16
|
-
height: 100%;
|
|
43
|
+
.vkf-widget-tab > .is-active.vk-tab-item{
|
|
44
|
+
color: var(--el-color-primary);
|
|
17
45
|
}
|
|
18
|
-
|
|
19
|
-
.
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: end;
|
|
22
|
-
margin-bottom: var(--gap-xxs);
|
|
46
|
+
.vkf-widget-tab > .vk-tab-item {
|
|
47
|
+
padding: 0.5em 1em;
|
|
23
48
|
}
|
|
24
49
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
50
|
+
/* for FormItemWidget */
|
|
51
|
+
.vkf-ground-widget-ul {
|
|
52
|
+
display: grid;
|
|
53
|
+
grid: auto-flow / repeat(2, 1fr);
|
|
29
54
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
55
|
+
.vkf-ground-widget-ul li{
|
|
56
|
+
text-align: center;
|
|
57
|
+
margin: 0.25em .5em;
|
|
58
|
+
background: var(--el-color-info-light-8);
|
|
59
|
+
cursor: move;
|
|
60
|
+
border-radius: 4px;
|
|
34
61
|
}
|
|
35
62
|
|
|
36
63
|
.vkf-ground-main {
|
|
@@ -59,33 +86,6 @@
|
|
|
59
86
|
padding: 1em .5em 0;
|
|
60
87
|
}
|
|
61
88
|
|
|
62
|
-
.vkf-widget-tab{
|
|
63
|
-
position: relative;
|
|
64
|
-
width: 100%;
|
|
65
|
-
display: flex;
|
|
66
|
-
justify-content: space-around;
|
|
67
|
-
--vk-float-block-color: var(--el-color-primary);
|
|
68
|
-
}
|
|
69
|
-
.vkf-widget-tab > .is-active.vk-tab-item{
|
|
70
|
-
color: var(--el-color-primary);
|
|
71
|
-
}
|
|
72
|
-
.vkf-widget-tab > .vk-tab-item {
|
|
73
|
-
padding: 0.5em 1em;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* for FormItemWidget */
|
|
77
|
-
.vkf-ground-widget-ul {
|
|
78
|
-
display: grid;
|
|
79
|
-
grid: auto-flow / repeat(2, 1fr);
|
|
80
|
-
}
|
|
81
|
-
.vkf-ground-widget-ul li{
|
|
82
|
-
text-align: center;
|
|
83
|
-
margin: 0.25em .5em;
|
|
84
|
-
background: var(--el-color-info-light-8);
|
|
85
|
-
cursor: move;
|
|
86
|
-
border-radius: 4px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
89
|
.vkf-ground-main-editing-wrapper{
|
|
90
90
|
overflow: hidden;
|
|
91
91
|
position: relative;
|
|
@@ -637,6 +637,7 @@ var script$2 = defineComponent({
|
|
|
637
637
|
type: String,
|
|
638
638
|
default: ""
|
|
639
639
|
},
|
|
640
|
+
data: Object,
|
|
640
641
|
k: {
|
|
641
642
|
type: Array,
|
|
642
643
|
default: () => []
|
|
@@ -644,11 +645,11 @@ var script$2 = defineComponent({
|
|
|
644
645
|
},
|
|
645
646
|
emits: {
|
|
646
647
|
"update:prop": (e) => e,
|
|
648
|
+
"setData": (e) => e,
|
|
647
649
|
"setData:formItems": null,
|
|
648
650
|
"unsetData:formItems": null
|
|
649
651
|
},
|
|
650
652
|
setup(props, { emit }) {
|
|
651
|
-
const formData = ref({});
|
|
652
653
|
const groundEndClassName = ref(DragoverClasses.normal);
|
|
653
654
|
const formItemsWithWrapper = computed(() => {
|
|
654
655
|
const data = [];
|
|
@@ -766,7 +767,6 @@ var script$2 = defineComponent({
|
|
|
766
767
|
drop,
|
|
767
768
|
setData,
|
|
768
769
|
editDrop,
|
|
769
|
-
formData,
|
|
770
770
|
formItemsWithWrapper
|
|
771
771
|
};
|
|
772
772
|
}
|
|
@@ -797,8 +797,8 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
797
797
|
default: withCtx(() => [
|
|
798
798
|
createVNode(_component_VkfForm, {
|
|
799
799
|
formItems: _ctx.formItemsWithWrapper,
|
|
800
|
-
data: _ctx.
|
|
801
|
-
onSetData: _cache[1] || (_cache[1] = ($event) => _ctx
|
|
800
|
+
data: _ctx.data,
|
|
801
|
+
onSetData: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("setData", $event))
|
|
802
802
|
}, {
|
|
803
803
|
rendererTemplate: withCtx(() => [
|
|
804
804
|
createVNode(_component_VkfFormItemRendererTemplate, { type: "VkfEditingSelect" }, {
|
|
@@ -1062,27 +1062,32 @@ var script = defineComponent({
|
|
|
1062
1062
|
type: Array,
|
|
1063
1063
|
default: void 0
|
|
1064
1064
|
},
|
|
1065
|
-
|
|
1065
|
+
source: {
|
|
1066
1066
|
type: Array,
|
|
1067
1067
|
default: () => []
|
|
1068
|
+
},
|
|
1069
|
+
data: {
|
|
1070
|
+
type: Object,
|
|
1071
|
+
default: () => ({})
|
|
1068
1072
|
}
|
|
1069
1073
|
},
|
|
1070
1074
|
emits: {
|
|
1071
|
-
"update:
|
|
1075
|
+
"update:source": null,
|
|
1076
|
+
"setData:source": (e) => e,
|
|
1077
|
+
"unsetData:source": null,
|
|
1072
1078
|
"setData": (e) => e,
|
|
1073
|
-
"unsetData": null,
|
|
1074
1079
|
"update:componentLibCollapseExpanded": null
|
|
1075
1080
|
},
|
|
1076
1081
|
setup(props, { emit }) {
|
|
1077
|
-
const editProp = ref("");
|
|
1078
1082
|
const propToFormItem = computed(() => {
|
|
1079
|
-
return props.
|
|
1083
|
+
return props.source.reduce((a, c) => {
|
|
1080
1084
|
if (c.prop) {
|
|
1081
1085
|
a[c.prop] = c;
|
|
1082
1086
|
}
|
|
1083
1087
|
return a;
|
|
1084
1088
|
}, {});
|
|
1085
1089
|
});
|
|
1090
|
+
const editProp = ref("");
|
|
1086
1091
|
const configPropDisabled = ref(true);
|
|
1087
1092
|
const setFormItem = (props2, e) => {
|
|
1088
1093
|
if (e.k === "prop") {
|
|
@@ -1109,7 +1114,7 @@ var script = defineComponent({
|
|
|
1109
1114
|
setData(props2, e);
|
|
1110
1115
|
}
|
|
1111
1116
|
};
|
|
1112
|
-
const formItemStr = computed(() => JSON.stringify(props.
|
|
1117
|
+
const formItemStr = computed(() => JSON.stringify(props.source));
|
|
1113
1118
|
const formItemClip = useClipboard({
|
|
1114
1119
|
source: formItemStr
|
|
1115
1120
|
});
|
|
@@ -1130,7 +1135,7 @@ var script = defineComponent({
|
|
|
1130
1135
|
}
|
|
1131
1136
|
return obj;
|
|
1132
1137
|
}).then((obj) => {
|
|
1133
|
-
emit("update:
|
|
1138
|
+
emit("update:source", obj);
|
|
1134
1139
|
});
|
|
1135
1140
|
};
|
|
1136
1141
|
return {
|
|
@@ -1192,17 +1197,19 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1192
1197
|
]),
|
|
1193
1198
|
default: withCtx(() => [
|
|
1194
1199
|
createVNode(_component_VkfGroundMain, {
|
|
1200
|
+
data: _ctx.data,
|
|
1201
|
+
onSetData: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("setData", $event)),
|
|
1195
1202
|
prop: _ctx.editProp,
|
|
1196
|
-
"onUpdate:prop": _cache[
|
|
1197
|
-
formItems: _ctx.
|
|
1198
|
-
"onSetData:formItems": _cache[
|
|
1199
|
-
"onUnsetData:formItems": _cache[
|
|
1203
|
+
"onUpdate:prop": _cache[3] || (_cache[3] = ($event) => _ctx.editProp = $event),
|
|
1204
|
+
formItems: _ctx.source,
|
|
1205
|
+
"onSetData:formItems": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("setData:source", $event)),
|
|
1206
|
+
"onUnsetData:formItems": _cache[5] || (_cache[5] = ($event) => _ctx.$emit("unsetData:source", $event))
|
|
1200
1207
|
}, {
|
|
1201
1208
|
rendererTemplate: withCtx(() => [
|
|
1202
1209
|
renderSlot(_ctx.$slots, "rendererTemplate")
|
|
1203
1210
|
]),
|
|
1204
1211
|
_: 3
|
|
1205
|
-
}, 8, ["prop", "formItems"])
|
|
1212
|
+
}, 8, ["data", "prop", "formItems"])
|
|
1206
1213
|
]),
|
|
1207
1214
|
_: 3
|
|
1208
1215
|
})
|
|
@@ -1212,10 +1219,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1212
1219
|
_ctx.editProp && _ctx.propToFormItem[_ctx.editProp] ? (openBlock(), createBlock(_component_VkfGroundConfig, {
|
|
1213
1220
|
key: 0,
|
|
1214
1221
|
propDisabled: _ctx.configPropDisabled,
|
|
1215
|
-
"onUpdate:propDisabled": _cache[
|
|
1222
|
+
"onUpdate:propDisabled": _cache[6] || (_cache[6] = ($event) => _ctx.configPropDisabled = $event),
|
|
1216
1223
|
templateType: _ctx.propToFormItem[_ctx.editProp].templateType,
|
|
1217
1224
|
data: _ctx.propToFormItem[_ctx.editProp],
|
|
1218
|
-
onSetData: _cache[
|
|
1225
|
+
onSetData: _cache[7] || (_cache[7] = ($event) => _ctx.setFormItem(_ctx.propToFormItem[_ctx.editProp], $event))
|
|
1219
1226
|
}, {
|
|
1220
1227
|
rendererTemplate: withCtx(() => [
|
|
1221
1228
|
renderSlot(_ctx.$slots, "configRendererTemplate")
|
|
@@ -2,6 +2,7 @@ import { PropType, Ref } from 'vue';
|
|
|
2
2
|
import { DragoverClasses } from '@vunk/form/components/drop-wrapper';
|
|
3
3
|
import type { FormItemRendererSourcePlus } from './types';
|
|
4
4
|
import type { DataTransferJson } from '@vunk/form/shared/types/drag';
|
|
5
|
+
import { SetDataEvent } from '@vunk/form/shared/types';
|
|
5
6
|
interface SourceTransfer extends DataTransferJson {
|
|
6
7
|
source: FormItemRendererSourcePlus;
|
|
7
8
|
}
|
|
@@ -14,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
15
|
type: StringConstructor;
|
|
15
16
|
default: string;
|
|
16
17
|
};
|
|
18
|
+
data: ObjectConstructor;
|
|
17
19
|
k: {
|
|
18
20
|
type: ArrayConstructor;
|
|
19
21
|
default: () => never[];
|
|
@@ -30,10 +32,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
32
|
insert?: boolean | undefined;
|
|
31
33
|
}) => void;
|
|
32
34
|
editDrop: (e: DragEvent, overClass: DragoverClasses, toData: SourceTransfer) => void;
|
|
33
|
-
formData: Ref<{}>;
|
|
34
35
|
formItemsWithWrapper: import("vue").ComputedRef<FormItemRendererSourcePlus[]>;
|
|
35
36
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
37
|
'update:prop': (e: string) => string;
|
|
38
|
+
setData: (e: SetDataEvent) => SetDataEvent<any>;
|
|
37
39
|
'setData:formItems': null;
|
|
38
40
|
'unsetData:formItems': null;
|
|
39
41
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -45,11 +47,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
47
|
type: StringConstructor;
|
|
46
48
|
default: string;
|
|
47
49
|
};
|
|
50
|
+
data: ObjectConstructor;
|
|
48
51
|
k: {
|
|
49
52
|
type: ArrayConstructor;
|
|
50
53
|
default: () => never[];
|
|
51
54
|
};
|
|
52
55
|
}>> & {
|
|
56
|
+
onSetData?: ((e: SetDataEvent<any>) => any) | undefined;
|
|
53
57
|
"onSetData:formItems"?: ((...args: any[]) => any) | undefined;
|
|
54
58
|
"onUnsetData:formItems"?: ((...args: any[]) => any) | undefined;
|
|
55
59
|
"onUpdate:prop"?: ((e: string) => any) | undefined;
|
|
@@ -7,10 +7,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: PropType<any[]>;
|
|
8
8
|
default: undefined;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
source: {
|
|
11
11
|
type: PropType<any[]>;
|
|
12
12
|
default: () => never[];
|
|
13
13
|
};
|
|
14
|
+
data: {
|
|
15
|
+
type: PropType<Record<string, any>>;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
14
18
|
}, {
|
|
15
19
|
propToFormItem: import("vue").ComputedRef<any>;
|
|
16
20
|
editProp: import("vue").Ref<string>;
|
|
@@ -28,26 +32,33 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
32
|
formItemClip: import("@vueuse/core").ClipboardReturn<true>;
|
|
29
33
|
inputJson: () => void;
|
|
30
34
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
-
'update:
|
|
35
|
+
'update:source': null;
|
|
36
|
+
'setData:source': (e: SetDataEvent) => SetDataEvent<any>;
|
|
37
|
+
'unsetData:source': null;
|
|
32
38
|
setData: (e: SetDataEvent) => SetDataEvent<any>;
|
|
33
|
-
unsetData: null;
|
|
34
39
|
'update:componentLibCollapseExpanded': null;
|
|
35
40
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
36
41
|
componentLibCollapseExpanded: {
|
|
37
42
|
type: PropType<any[]>;
|
|
38
43
|
default: undefined;
|
|
39
44
|
};
|
|
40
|
-
|
|
45
|
+
source: {
|
|
41
46
|
type: PropType<any[]>;
|
|
42
47
|
default: () => never[];
|
|
43
48
|
};
|
|
49
|
+
data: {
|
|
50
|
+
type: PropType<Record<string, any>>;
|
|
51
|
+
default: () => {};
|
|
52
|
+
};
|
|
44
53
|
}>> & {
|
|
45
54
|
onSetData?: ((e: SetDataEvent<any>) => any) | undefined;
|
|
55
|
+
"onSetData:source"?: ((e: SetDataEvent<any>) => any) | undefined;
|
|
46
56
|
"onUpdate:componentLibCollapseExpanded"?: ((...args: any[]) => any) | undefined;
|
|
47
|
-
"onUpdate:
|
|
48
|
-
onUnsetData?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
"onUpdate:source"?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
"onUnsetData:source"?: ((...args: any[]) => any) | undefined;
|
|
49
59
|
}, {
|
|
50
|
-
data: any
|
|
60
|
+
data: Record<string, any>;
|
|
61
|
+
source: any[];
|
|
51
62
|
componentLibCollapseExpanded: any[];
|
|
52
63
|
}>;
|
|
53
64
|
export default _default;
|
package/full-entry/main.d.ts
CHANGED
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
package/index.esm.js
CHANGED
package/package.json
CHANGED
|
@@ -7,3 +7,5 @@ export declare const createSwitchBindProps: <T2 extends Record<string, any>, EX
|
|
|
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
8
|
export declare const createSelectBindProps: <T2 extends Record<string, any>, EX extends ("size" | "id" | "disabled" | "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" | "id" | "disabled" | "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" | "id" | "disabled" | "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" | "id" | "disabled" | "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 };
|