@vunk/form 0.0.0-alpha.3 → 0.0.0-alpha.5
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/ground/index.css +34 -31
- package/components/ground/index.js +35 -14
- package/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +594 -0
- package/components/ground/src/index.vue.d.ts +19 -5
- package/components/select/index.js +20 -6
- package/components/select/src/ctx.d.ts +5 -0
- package/components/select/src/index.vue.d.ts +9 -0
- package/components/select/src/types.d.ts +5 -3
- package/index.css +43 -40
- package/index.d.ts +8 -8
- package/package.json +1 -1
- package/shared/types/shared/index.d.ts +4 -0
- package/types/components/ground/src/ground-widget/src/form-item-widget/src/index.vue.d.ts +594 -0
- package/types/components/ground/src/index.vue.d.ts +19 -5
- package/types/components/select/src/ctx.d.ts +5 -0
- package/types/components/select/src/index.vue.d.ts +9 -0
- package/types/components/select/src/types.d.ts +5 -3
- package/types/shared/types/shared/index.d.ts +4 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
2
|
import { selectProps, selectEmits } from '@vunk/form/shared/element-plus/instances/select';
|
|
3
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createElementBlock, Fragment, renderList } from 'vue';
|
|
3
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createSlots, createElementBlock, Fragment, renderList, renderSlot, resolveDynamicComponent } from 'vue';
|
|
4
4
|
import { createSelectBindProps, createSelectOnEmits } from '@vunk/form/shared/element-plus/ctx';
|
|
5
5
|
import { ElSelect, ElOption } from 'element-plus';
|
|
6
6
|
import { isPlainObject } from 'vunk/shared/utils-object';
|
|
@@ -11,6 +11,10 @@ const props = {
|
|
|
11
11
|
options: {
|
|
12
12
|
type: Array,
|
|
13
13
|
default: () => []
|
|
14
|
+
},
|
|
15
|
+
selectSlots: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: void 0
|
|
14
18
|
}
|
|
15
19
|
};
|
|
16
20
|
const emits = {
|
|
@@ -46,18 +50,28 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
46
50
|
const _component_VkfFormItem = resolveComponent("VkfFormItem");
|
|
47
51
|
return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
|
|
48
52
|
default: withCtx(() => [
|
|
49
|
-
createVNode(_component_ElSelect, mergeProps(_ctx.selectBindProps, toHandlers(_ctx.selectOnEmits)), {
|
|
53
|
+
createVNode(_component_ElSelect, mergeProps(_ctx.selectBindProps, toHandlers(_ctx.selectOnEmits)), createSlots({
|
|
50
54
|
default: withCtx(() => [
|
|
51
55
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item) => {
|
|
52
56
|
return openBlock(), createBlock(_component_ElOption, mergeProps({
|
|
53
57
|
key: _ctx.getKey(item)
|
|
54
58
|
}, item), null, 16);
|
|
55
|
-
}), 128))
|
|
59
|
+
}), 128)),
|
|
60
|
+
renderSlot(_ctx.$slots, "default")
|
|
56
61
|
]),
|
|
57
|
-
_:
|
|
58
|
-
},
|
|
62
|
+
_: 2
|
|
63
|
+
}, [
|
|
64
|
+
renderList(_ctx.selectSlots, (item, key) => {
|
|
65
|
+
return {
|
|
66
|
+
name: key,
|
|
67
|
+
fn: withCtx((e) => [
|
|
68
|
+
(openBlock(), createBlock(resolveDynamicComponent(item?.(e))))
|
|
69
|
+
])
|
|
70
|
+
};
|
|
71
|
+
})
|
|
72
|
+
]), 1040)
|
|
59
73
|
]),
|
|
60
|
-
_:
|
|
74
|
+
_: 3
|
|
61
75
|
}, 16);
|
|
62
76
|
}
|
|
63
77
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VueComponentPropsType } from 'vunk/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
|
+
import { SelectSlots } from './types';
|
|
3
4
|
export declare const props: {
|
|
4
5
|
options: {
|
|
5
6
|
type: PropType<VueComponentPropsType<import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -64,6 +65,10 @@ export declare const props: {
|
|
|
64
65
|
}>>>[]>;
|
|
65
66
|
default: () => never[];
|
|
66
67
|
};
|
|
68
|
+
selectSlots: {
|
|
69
|
+
type: PropType<SelectSlots>;
|
|
70
|
+
default: undefined;
|
|
71
|
+
};
|
|
67
72
|
name: StringConstructor;
|
|
68
73
|
id: StringConstructor;
|
|
69
74
|
modelValue: {
|
|
@@ -62,6 +62,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
62
62
|
}>>>[]>;
|
|
63
63
|
default: () => never[];
|
|
64
64
|
};
|
|
65
|
+
selectSlots: {
|
|
66
|
+
type: import("vue").PropType<import("./types").SelectSlots>;
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
65
69
|
name: StringConstructor;
|
|
66
70
|
id: StringConstructor;
|
|
67
71
|
modelValue: {
|
|
@@ -365,6 +369,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
365
369
|
}>>>[]>;
|
|
366
370
|
default: () => never[];
|
|
367
371
|
};
|
|
372
|
+
selectSlots: {
|
|
373
|
+
type: import("vue").PropType<import("./types").SelectSlots>;
|
|
374
|
+
default: undefined;
|
|
375
|
+
};
|
|
368
376
|
name: StringConstructor;
|
|
369
377
|
id: StringConstructor;
|
|
370
378
|
modelValue: {
|
|
@@ -576,5 +584,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
576
584
|
disabled: boolean;
|
|
577
585
|
created: boolean;
|
|
578
586
|
}>>>[];
|
|
587
|
+
selectSlots: import("./types").SelectSlots;
|
|
579
588
|
}>;
|
|
580
589
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type
|
|
3
|
-
|
|
1
|
+
import { Func } from '@vunk/form/shared/types';
|
|
2
|
+
export declare type SelectSlots = {
|
|
3
|
+
prefix?: Func;
|
|
4
|
+
empty?: Func;
|
|
5
|
+
};
|
package/index.css
CHANGED
|
@@ -1,44 +1,47 @@
|
|
|
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
|
+
}
|
|
1
10
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.vkf-ground {
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.vkf-ground-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.vkf-ground-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.vkf-ground-config-x {
|
|
39
|
-
padding: 0 1em;
|
|
40
|
-
flex: 1;
|
|
41
|
-
}
|
|
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
|
+
}
|
|
42
45
|
|
|
43
46
|
.vkf-ground-main {
|
|
44
47
|
min-height: 100%;
|
package/index.d.ts
CHANGED
|
@@ -24,11 +24,11 @@ export * from '@vunk/form/components/confirm-input'
|
|
|
24
24
|
export * from '@vunk/form/components/form'
|
|
25
25
|
|
|
26
26
|
export * from '@vunk/form/components/rules-config'
|
|
27
|
-
|
|
28
|
-
export * from '@vunk/form/components/switch'
|
|
29
|
-
|
|
30
|
-
export * from '@vunk/form/components/form-item'
|
|
31
|
-
|
|
32
|
-
export * from '@vunk/form/components/select'
|
|
33
|
-
|
|
34
|
-
export * from '@vunk/form/components/select-config'
|
|
27
|
+
|
|
28
|
+
export * from '@vunk/form/components/switch'
|
|
29
|
+
|
|
30
|
+
export * from '@vunk/form/components/form-item'
|
|
31
|
+
|
|
32
|
+
export * from '@vunk/form/components/select'
|
|
33
|
+
|
|
34
|
+
export * from '@vunk/form/components/select-config'
|
package/package.json
CHANGED