@vunk/form 2.16.5 → 2.16.7
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/cascader/src/ctx.d.ts +1 -1
- package/components/cascader/src/index.vue.d.ts +7 -7
- package/components/date-picker/src/ctx.d.ts +1 -1
- package/components/date-picker/src/index.vue.d.ts +3 -3
- package/components/date-picker-range/src/ctx.d.ts +9 -9
- package/components/date-picker-range/src/index.vue.d.ts +19 -19
- package/components/form/src/ctx.d.ts +3 -3
- package/components/form/src/index.vue.d.ts +3 -1417
- package/components/input-tag/src/ctx.d.ts +1 -1
- package/components/input-tag/src/index.vue.d.ts +2 -2
- package/components/select/index.cjs +16 -9
- package/components/select/index.mjs +10 -3
- package/components/select/src/core.vue.d.ts +602 -98
- package/components/select/src/ctx.d.ts +193 -46
- package/components/select/src/index.vue.d.ts +392 -85
- package/components/van-cascader/src/index.vue.d.ts +3 -3
- package/package.json +1 -1
- package/shared/element-plus/ctx.d.ts +12 -11
- package/shared/element-plus/index.cjs +2 -132
- package/shared/element-plus/index.mjs +2 -130
- package/shared/element-plus/instances.d.ts +2 -99
|
@@ -221,7 +221,7 @@ export declare const props: {
|
|
|
221
221
|
};
|
|
222
222
|
ariaLabel: StringConstructor;
|
|
223
223
|
};
|
|
224
|
-
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"information", keyof T2> | Extract<"prop", keyof T2> | Extract<"defaultModelValue", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"disabled", keyof T2> | Extract<"trigger", keyof T2> | Extract<"id", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"clearable", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"autofocus", keyof T2> | Extract<"max", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"clearIcon", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"
|
|
224
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"information", keyof T2> | Extract<"prop", keyof T2> | Extract<"defaultModelValue", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"disabled", keyof T2> | Extract<"trigger", keyof T2> | Extract<"id", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"clearable", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"autofocus", keyof T2> | Extract<"max", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"clearIcon", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"maxCollapseTags", keyof T2> | Extract<"tagType", keyof T2> | Extract<"tagEffect", keyof T2> | Extract<"draggable", keyof T2> | Extract<"delimiter", keyof T2> | Extract<"saveOnBlur", keyof T2> | Extract<"inputTagSlots", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"size", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"formItemTip", keyof T2>, KE> | Exclude<Extract<"formItemTipClass", keyof T2>, KE> | Exclude<Extract<"labelTip", keyof T2>, KE> | Exclude<Extract<"information", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"defaultModelValue", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"labelPosition", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"trigger", keyof T2>, KE> | Exclude<Extract<"id", keyof T2>, KE> | Exclude<Extract<"ariaLabel", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"clearable", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"autofocus", keyof T2>, KE> | Exclude<Extract<"max", keyof T2>, KE> | Exclude<Extract<"maxlength", keyof T2>, KE> | Exclude<Extract<"minlength", keyof T2>, KE> | Exclude<Extract<"autocomplete", keyof T2>, KE> | Exclude<Extract<"clearIcon", keyof T2>, KE> | Exclude<Extract<"tabindex", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"collapseTags", keyof T2>, KE> | Exclude<Extract<"collapseTagsTooltip", keyof T2>, KE> | Exclude<Extract<"maxCollapseTags", keyof T2>, KE> | Exclude<Extract<"tagType", keyof T2>, KE> | Exclude<Extract<"tagEffect", keyof T2>, KE> | Exclude<Extract<"draggable", keyof T2>, KE> | Exclude<Extract<"delimiter", keyof T2>, KE> | Exclude<Extract<"saveOnBlur", keyof T2>, KE> | Exclude<Extract<"inputTagSlots", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"information", keyof T2> | Extract<"prop", keyof T2> | Extract<"defaultModelValue", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"disabled", keyof T2> | Extract<"trigger", keyof T2> | Extract<"id", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"clearable", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"autofocus", keyof T2> | Extract<"max", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"clearIcon", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"maxCollapseTags", keyof T2> | Extract<"tagType", keyof T2> | Extract<"tagEffect", keyof T2> | Extract<"draggable", keyof T2> | Extract<"delimiter", keyof T2> | Extract<"saveOnBlur", keyof T2> | Extract<"inputTagSlots", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"formItemTip", keyof T2> | Extract<"formItemTipClass", keyof T2> | Extract<"labelTip", keyof T2> | Extract<"information", keyof T2> | Extract<"prop", keyof T2> | Extract<"defaultModelValue", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"disabled", keyof T2> | Extract<"trigger", keyof T2> | Extract<"id", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"clearable", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"autofocus", keyof T2> | Extract<"max", keyof T2> | Extract<"maxlength", keyof T2> | Extract<"minlength", keyof T2> | Extract<"autocomplete", keyof T2> | Extract<"clearIcon", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"collapseTags", keyof T2> | Extract<"collapseTagsTooltip", keyof T2> | Extract<"maxCollapseTags", keyof T2> | Extract<"tagType", keyof T2> | Extract<"tagEffect", keyof T2> | Extract<"draggable", keyof T2> | Extract<"delimiter", keyof T2> | Extract<"saveOnBlur", keyof T2> | Extract<"inputTagSlots", keyof T2>]: T2[k]; }[P]; }>;
|
|
225
225
|
export declare const emits: {
|
|
226
226
|
"update:modelValue": (value?: string[]) => boolean;
|
|
227
227
|
change: (value?: string[]) => boolean;
|
|
@@ -238,8 +238,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
238
238
|
validateEvent: boolean;
|
|
239
239
|
collapseTags: boolean;
|
|
240
240
|
collapseTagsTooltip: boolean;
|
|
241
|
-
tagType: "primary" | "success" | "warning" | "info" | "danger";
|
|
242
241
|
maxCollapseTags: number;
|
|
242
|
+
tagType: "primary" | "success" | "warning" | "info" | "danger";
|
|
243
243
|
tagEffect: "dark" | "light" | "plain";
|
|
244
244
|
draggable: boolean;
|
|
245
245
|
delimiter: string | RegExp;
|
|
@@ -512,8 +512,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
512
512
|
validateEvent: boolean;
|
|
513
513
|
collapseTags: boolean;
|
|
514
514
|
collapseTagsTooltip: boolean;
|
|
515
|
-
tagType: "primary" | "success" | "warning" | "info" | "danger";
|
|
516
515
|
maxCollapseTags: number;
|
|
516
|
+
tagType: "primary" | "success" | "warning" | "info" | "danger";
|
|
517
517
|
tagEffect: "dark" | "light" | "plain";
|
|
518
518
|
draggable: boolean;
|
|
519
519
|
delimiter: string | RegExp;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var formItem = require('@vunk/form/components/form-item');
|
|
7
|
-
var elementPlus = require('
|
|
7
|
+
var elementPlus = require('element-plus');
|
|
8
8
|
var utilsVue = require('@vunk/core/shared/utils-vue');
|
|
9
|
-
var elementPlus$1 = require('element-plus');
|
|
9
|
+
var elementPlus$1 = require('@vunk/form/shared/element-plus');
|
|
10
10
|
var utilsObject = require('@vunk/core/shared/utils-object');
|
|
11
11
|
var composables = require('@vunk/form/composables');
|
|
12
12
|
var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
@@ -14,6 +14,12 @@ var _pluginVue_exportHelper = require('../_plugin-vue_export-helper.cjs');
|
|
|
14
14
|
const props = {
|
|
15
15
|
...formItem._VkfFormItemCtx.props,
|
|
16
16
|
...elementPlus.selectProps,
|
|
17
|
+
modelValue: null,
|
|
18
|
+
props: {
|
|
19
|
+
// For Type
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => ({})
|
|
22
|
+
},
|
|
17
23
|
options: {
|
|
18
24
|
type: Array,
|
|
19
25
|
default: () => []
|
|
@@ -54,7 +60,8 @@ const props = {
|
|
|
54
60
|
};
|
|
55
61
|
const createBindProps = utilsVue.bindPropsFactory(props);
|
|
56
62
|
const emits = {
|
|
57
|
-
...elementPlus.selectEmits
|
|
63
|
+
...elementPlus.selectEmits,
|
|
64
|
+
"update:modelValue": null
|
|
58
65
|
};
|
|
59
66
|
const createOnEmits = utilsVue.onEmitsFactory(emits);
|
|
60
67
|
|
|
@@ -86,7 +93,7 @@ var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
86
93
|
const ItemView = item => {
|
|
87
94
|
let _slot;
|
|
88
95
|
const isGroup = props.optionChildrenProp && Array.isArray(item[props.optionChildrenProp]) && item[props.optionChildrenProp].length > 0;
|
|
89
|
-
return isGroup ? vue.createVNode(elementPlus
|
|
96
|
+
return isGroup ? vue.createVNode(elementPlus.ElOptionGroup, {
|
|
90
97
|
"label": item.label,
|
|
91
98
|
"key": item.value || item.label,
|
|
92
99
|
"disabled": item.disabled
|
|
@@ -94,7 +101,7 @@ var _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
94
101
|
"key": childOption.value
|
|
95
102
|
}, childOption), null))) ? _slot : {
|
|
96
103
|
default: () => [_slot]
|
|
97
|
-
}) : vue.createVNode(elementPlus
|
|
104
|
+
}) : vue.createVNode(elementPlus.ElOption, {
|
|
98
105
|
"key": item.value,
|
|
99
106
|
"value": item.value,
|
|
100
107
|
"class": item.class,
|
|
@@ -118,16 +125,16 @@ var Options = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$2, [
|
|
|
118
125
|
var _sfc_main$1 = vue.defineComponent({
|
|
119
126
|
components: {
|
|
120
127
|
VkfFormItem: formItem.VkfFormItem,
|
|
121
|
-
ElSelect: elementPlus
|
|
122
|
-
ElOption: elementPlus
|
|
128
|
+
ElSelect: elementPlus.ElSelect,
|
|
129
|
+
ElOption: elementPlus.ElOption,
|
|
123
130
|
Options
|
|
124
131
|
},
|
|
125
132
|
props,
|
|
126
133
|
emits,
|
|
127
134
|
setup(props2, { emit }) {
|
|
128
135
|
const formItemBindProps = formItem._VkfFormItemCtx.createBindProps(props2);
|
|
129
|
-
const selectBindProps = elementPlus.createSelectBindProps(props2, ["disabled", "modelValue"]);
|
|
130
|
-
const selectOnEmits = elementPlus.createSelectOnEmits(emit, ["update:modelValue"]);
|
|
136
|
+
const selectBindProps = elementPlus$1.createSelectBindProps(props2, ["disabled", "modelValue"]);
|
|
137
|
+
const selectOnEmits = elementPlus$1.createSelectOnEmits(emit, ["update:modelValue"]);
|
|
131
138
|
const readonly = composables.useComputedReadonly(props2);
|
|
132
139
|
const theModelValue = vue.computed({
|
|
133
140
|
get: () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, createVNode, mergeProps, isVNode, computed, ref, watch, nextTick, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, toHandlers, createSlots, renderSlot, renderList, resolveDynamicComponent, createCommentVNode, h } from 'vue';
|
|
2
2
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
3
|
-
import { selectProps, selectEmits,
|
|
3
|
+
import { selectProps, selectEmits, ElOptionGroup, ElOption, ElSelect } from 'element-plus';
|
|
4
4
|
import { bindPropsFactory, onEmitsFactory, vOn } from '@vunk/core/shared/utils-vue';
|
|
5
|
-
import {
|
|
5
|
+
import { createSelectBindProps, createSelectOnEmits } from '@vunk/form/shared/element-plus';
|
|
6
6
|
import { isNotEmptyObject, isPlainObject } from '@vunk/core/shared/utils-object';
|
|
7
7
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
8
8
|
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
@@ -10,6 +10,12 @@ import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
|
10
10
|
const props = {
|
|
11
11
|
..._VkfFormItemCtx.props,
|
|
12
12
|
...selectProps,
|
|
13
|
+
modelValue: null,
|
|
14
|
+
props: {
|
|
15
|
+
// For Type
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
18
|
+
},
|
|
13
19
|
options: {
|
|
14
20
|
type: Array,
|
|
15
21
|
default: () => []
|
|
@@ -50,7 +56,8 @@ const props = {
|
|
|
50
56
|
};
|
|
51
57
|
const createBindProps = bindPropsFactory(props);
|
|
52
58
|
const emits = {
|
|
53
|
-
...selectEmits
|
|
59
|
+
...selectEmits,
|
|
60
|
+
"update:modelValue": null
|
|
54
61
|
};
|
|
55
62
|
const createOnEmits = onEmitsFactory(emits);
|
|
56
63
|
|