@vunk/form 1.1.18 → 1.1.20

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.
@@ -1,4 +1,5 @@
1
1
  import VkfCheckbox from './src/index.vue.d';
2
2
  export * as __VkfCheckbox from './src/types';
3
+ export * as _VkfCheckboxCtx from './src/ctx';
3
4
  export { VkfCheckbox, };
4
5
  export default VkfCheckbox;
@@ -1,5 +1,6 @@
1
1
  import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
2
2
  import { checkboxGroupProps, checkboxGroupEmits, ElCheckbox, ElCheckboxGroup, ElCheckboxButton } from 'element-plus';
3
+ import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
3
4
  import { defineComponent, computed, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createElementBlock, Fragment, renderList, resolveDynamicComponent, createTextVNode, toDisplayString } from 'vue';
4
5
  import { createCheckboxGroupBindProps, createCheckboxGroupOnEmits } from '@vunk/form/shared/element-plus';
5
6
  import { pickObject } from '@vunk/core/shared/utils-object';
@@ -42,7 +43,17 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
42
43
  default: void 0
43
44
  }
44
45
  });
46
+ const createBindProps = bindPropsFactory(props);
45
47
  const emits = __spreadValues({}, checkboxGroupEmits);
48
+ const createOnEmits = onEmitsFactory(emits);
49
+
50
+ var ctx = /*#__PURE__*/Object.freeze({
51
+ __proto__: null,
52
+ props: props,
53
+ createBindProps: createBindProps,
54
+ emits: emits,
55
+ createOnEmits: createOnEmits
56
+ });
46
57
 
47
58
  var _export_sfc = (sfc, props) => {
48
59
  const target = sfc.__vccOpts || sfc;
@@ -124,4 +135,4 @@ VkfCheckbox.install = (app) => {
124
135
  app.component(VkfCheckbox.name, VkfCheckbox);
125
136
  };
126
137
 
127
- export { VkfCheckbox, types as __VkfCheckbox, VkfCheckbox as default };
138
+ export { VkfCheckbox, ctx as _VkfCheckboxCtx, types as __VkfCheckbox, VkfCheckbox as default };
@@ -80,7 +80,12 @@ export declare const props: {
80
80
  default: string;
81
81
  };
82
82
  };
83
+ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"fill", keyof T2> | Extract<"disabled", keyof T2> | Extract<"tag", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"options", keyof T2> | Extract<"defaultModelValue", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"textColor", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"type", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", 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<"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<"labelPosition", keyof T2>, KE> | Exclude<Extract<"fill", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"tag", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"options", keyof T2>, KE> | Exclude<Extract<"defaultModelValue", keyof T2>, KE> | Exclude<Extract<"max", keyof T2>, KE> | Exclude<Extract<"min", keyof T2>, KE> | Exclude<Extract<"textColor", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"fill", keyof T2> | Extract<"disabled", keyof T2> | Extract<"tag", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"options", keyof T2> | Extract<"defaultModelValue", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"textColor", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"fill", keyof T2> | Extract<"disabled", keyof T2> | Extract<"tag", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"options", keyof T2> | Extract<"defaultModelValue", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"textColor", keyof T2>]: T2[k]; }[P]; }>;
83
84
  export declare const emits: {
84
85
  "update:modelValue": (val: import("element-plus").CheckboxGroupValueType) => boolean;
85
86
  change: (val: import("element-plus").CheckboxValueType[]) => boolean;
86
87
  };
88
+ export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("update:modelValue" | "change")[] | undefined>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue", KE> | Exclude<"change", KE> : "update:modelValue" | "change"]: {
89
+ "update:modelValue": (...e: import("@vunk/core").RestParameters<T2>) => void;
90
+ change: (...e: import("@vunk/core").RestParameters<T2>) => void;
91
+ }[P]; };
@@ -1,5 +1,6 @@
1
1
  import { _VkfFormItemCtx } from '@vunk/form/components/form-item';
2
2
  import { checkboxGroupProps, checkboxGroupEmits } from 'element-plus';
3
+ import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
3
4
 
4
5
  var __defProp = Object.defineProperty;
5
6
  var __defProps = Object.defineProperties;
@@ -38,6 +39,8 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
38
39
  default: void 0
39
40
  }
40
41
  });
42
+ const createBindProps = bindPropsFactory(props);
41
43
  const emits = __spreadValues({}, checkboxGroupEmits);
44
+ const createOnEmits = onEmitsFactory(emits);
42
45
 
43
- export { emits, props };
46
+ export { createBindProps, createOnEmits, emits, props };
@@ -1,5 +1,5 @@
1
1
  import { _VkfInputCtx, VkfInput } from '@vunk/form/components/input';
2
- import { openBlock, createElementBlock, createElementVNode, defineComponent, computed, h, resolveComponent, createBlock, createCommentVNode, createVNode, mergeProps, toHandlers } from 'vue';
2
+ import { openBlock, createElementBlock, createElementVNode, defineComponent, computed, h, resolveComponent, createVNode, createBlock, mergeProps, toHandlers, createCommentVNode } from 'vue';
3
3
  import { ElButton, ElIcon } from 'element-plus';
4
4
  import { isPlainObject } from '@vunk/core/shared/utils-object';
5
5
  import { useComputedReadonly } from '@vunk/form/composables';
@@ -32,9 +32,9 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
32
32
  type: Number,
33
33
  default: 4
34
34
  },
35
- uploadUrl: {
35
+ label: {
36
36
  type: String,
37
- default: "https://pan.baidu.com/disk/main#/index?category=all"
37
+ default: "\u56DE\u586B\u5730\u5740"
38
38
  },
39
39
  placeholder: {
40
40
  type: String,
@@ -43,6 +43,22 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
43
43
  readonly: {
44
44
  type: Boolean,
45
45
  default: void 0
46
+ },
47
+ uploadUrl: {
48
+ type: String,
49
+ default: "https://pan.baidu.com/disk/main#/index?category=all"
50
+ },
51
+ referenceUrl: {
52
+ type: String,
53
+ default: "https://pan.baidu.com/disk/main#/index?category=all"
54
+ },
55
+ referenceOnly: {
56
+ type: Boolean,
57
+ default: false
58
+ },
59
+ referenceLabel: {
60
+ type: String,
61
+ default: "\u53C2\u8003\u5730\u5740"
46
62
  }
47
63
  });
48
64
  const emits = __spreadValues({}, _VkfInputCtx.emits);
@@ -97,15 +113,9 @@ const _sfc_main = defineComponent({
97
113
  emits,
98
114
  props,
99
115
  setup(props2, { emit }) {
100
- const coreProps = _VkfInputCtx.createBindProps(props2, ["disabled"]);
116
+ const coreProps = _VkfInputCtx.createBindProps(props2);
101
117
  const coreEmits = _VkfInputCtx.createOnEmits(emit);
102
118
  const readonly = useComputedReadonly(props2);
103
- const disabled = computed(() => {
104
- if (readonly.value) {
105
- return true;
106
- }
107
- return props2.disabled;
108
- });
109
119
  const createAppendEl = (url) => () => h(
110
120
  ElButton,
111
121
  {
@@ -140,7 +150,6 @@ const _sfc_main = defineComponent({
140
150
  coreEmits,
141
151
  createAppendEl,
142
152
  rules,
143
- disabled,
144
153
  readonly
145
154
  };
146
155
  }
@@ -149,23 +158,22 @@ const _hoisted_1 = { class: "vkf-form-item vkf-input-link" };
149
158
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
150
159
  const _component_VkfInput = resolveComponent("VkfInput");
151
160
  return openBlock(), createElementBlock("div", _hoisted_1, [
152
- !_ctx.readonly ? (openBlock(), createBlock(_component_VkfInput, {
153
- key: 0,
154
- label: "\u4E0A\u4F20\u5730\u5740",
161
+ createVNode(_component_VkfInput, {
162
+ label: _ctx.referenceLabel,
155
163
  disabled: true,
156
- modelValue: _ctx.uploadUrl,
164
+ modelValue: _ctx.referenceUrl ?? _ctx.uploadUrl,
157
165
  inputSlots: {
158
- append: _ctx.createAppendEl(_ctx.uploadUrl)
166
+ append: _ctx.createAppendEl(_ctx.referenceUrl ?? _ctx.uploadUrl)
159
167
  }
160
- }, null, 8, ["modelValue", "inputSlots"])) : createCommentVNode("v-if", true),
161
- createVNode(_component_VkfInput, mergeProps(_ctx.coreProps, toHandlers(_ctx.coreEmits), {
168
+ }, null, 8, ["label", "modelValue", "inputSlots"]),
169
+ !_ctx.referenceOnly ? (openBlock(), createBlock(_component_VkfInput, mergeProps({ key: 0 }, _ctx.coreProps, toHandlers(_ctx.coreEmits), {
162
170
  rules: _ctx.rules,
163
- disabled: _ctx.disabled,
171
+ readonly: _ctx.readonly,
164
172
  type: _ctx.readonly ? "text" : _ctx.type,
165
173
  inputSlots: {
166
174
  append: _ctx.readonly ? _ctx.createAppendEl(_ctx.modelValue + "") : void 0
167
175
  }
168
- }), null, 16, ["rules", "disabled", "type", "inputSlots"])
176
+ }), null, 16, ["rules", "readonly", "type", "inputSlots"])) : createCommentVNode("v-if", true)
169
177
  ]);
170
178
  }
171
179
  var VkfInputLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "index.vue"]]);
@@ -7,7 +7,7 @@ export declare const props: {
7
7
  type: NumberConstructor;
8
8
  default: number;
9
9
  };
10
- uploadUrl: {
10
+ label: {
11
11
  type: StringConstructor;
12
12
  default: string;
13
13
  };
@@ -19,8 +19,39 @@ export declare const props: {
19
19
  type: BooleanConstructor;
20
20
  default: undefined;
21
21
  };
22
+ /**
23
+ * @deprecated 请使用 referenceUrl
24
+ */
25
+ uploadUrl: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ /**
30
+ * 参考地址
31
+ */
32
+ referenceUrl: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ /**
37
+ * 仅展示参考地址
38
+ */
39
+ referenceOnly: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ /**
44
+ * @description 参考地址的 label
45
+ */
46
+ referenceLabel: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
22
50
  maxlength: {
23
51
  type: NumberConstructor;
52
+ /**
53
+ * @deprecated 请使用 referenceUrl
54
+ */
24
55
  required: boolean;
25
56
  };
26
57
  minlength: {
@@ -32,7 +63,6 @@ export declare const props: {
32
63
  default: undefined;
33
64
  };
34
65
  required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
35
- label: StringConstructor;
36
66
  labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
37
67
  prop: {
38
68
  readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
@@ -28,9 +28,9 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
28
28
  type: Number,
29
29
  default: 4
30
30
  },
31
- uploadUrl: {
31
+ label: {
32
32
  type: String,
33
- default: "https://pan.baidu.com/disk/main#/index?category=all"
33
+ default: "\u56DE\u586B\u5730\u5740"
34
34
  },
35
35
  placeholder: {
36
36
  type: String,
@@ -39,6 +39,22 @@ const props = __spreadProps(__spreadValues({}, _VkfInputCtx.props), {
39
39
  readonly: {
40
40
  type: Boolean,
41
41
  default: void 0
42
+ },
43
+ uploadUrl: {
44
+ type: String,
45
+ default: "https://pan.baidu.com/disk/main#/index?category=all"
46
+ },
47
+ referenceUrl: {
48
+ type: String,
49
+ default: "https://pan.baidu.com/disk/main#/index?category=all"
50
+ },
51
+ referenceOnly: {
52
+ type: Boolean,
53
+ default: false
54
+ },
55
+ referenceLabel: {
56
+ type: String,
57
+ default: "\u53C2\u8003\u5730\u5740"
42
58
  }
43
59
  });
44
60
  const emits = __spreadValues({}, _VkfInputCtx.emits);
@@ -8,7 +8,7 @@ declare const _default: import("vue").DefineComponent<{
8
8
  type: NumberConstructor;
9
9
  default: number;
10
10
  };
11
- uploadUrl: {
11
+ label: {
12
12
  type: StringConstructor;
13
13
  default: string;
14
14
  };
@@ -20,6 +20,22 @@ declare const _default: import("vue").DefineComponent<{
20
20
  type: BooleanConstructor;
21
21
  default: undefined;
22
22
  };
23
+ uploadUrl: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ referenceUrl: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ referenceOnly: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ referenceLabel: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
23
39
  maxlength: {
24
40
  type: NumberConstructor;
25
41
  required: boolean;
@@ -33,7 +49,6 @@ declare const _default: import("vue").DefineComponent<{
33
49
  default: undefined;
34
50
  };
35
51
  required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
36
- label: StringConstructor;
37
52
  labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
38
53
  prop: {
39
54
  readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
@@ -135,7 +150,7 @@ declare const _default: import("vue").DefineComponent<{
135
150
  coreProps: import("vue").ComputedRef<{
136
151
  required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
137
152
  type: string;
138
- label: string | undefined;
153
+ label: string;
139
154
  labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
140
155
  prop: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown> | undefined;
141
156
  rules: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => FormItemRule | FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<FormItemRule>) | ((new (...args: any[]) => FormItemRule | FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<FormItemRule>))[], unknown, unknown> | undefined;
@@ -151,6 +166,7 @@ declare const _default: import("vue").DefineComponent<{
151
166
  inline: boolean;
152
167
  readonly: boolean | undefined;
153
168
  labelPosition: "right";
169
+ disabled: boolean;
154
170
  id: string | undefined;
155
171
  modelValue: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined) | ((new (...args: any[]) => (string | number | null | undefined) & {}) | (() => string | number | null | undefined))[], unknown, unknown>;
156
172
  resize: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown> | undefined;
@@ -192,7 +208,6 @@ declare const _default: import("vue").DefineComponent<{
192
208
  [key: string]: any;
193
209
  }>;
194
210
  rules: import("vue").ComputedRef<FormItemRule[]>;
195
- disabled: import("vue").ComputedRef<boolean>;
196
211
  readonly: import("vue").ComputedRef<boolean>;
197
212
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
198
213
  "update:modelValue": (value: string) => boolean;
@@ -216,7 +231,7 @@ declare const _default: import("vue").DefineComponent<{
216
231
  type: NumberConstructor;
217
232
  default: number;
218
233
  };
219
- uploadUrl: {
234
+ label: {
220
235
  type: StringConstructor;
221
236
  default: string;
222
237
  };
@@ -228,6 +243,22 @@ declare const _default: import("vue").DefineComponent<{
228
243
  type: BooleanConstructor;
229
244
  default: undefined;
230
245
  };
246
+ uploadUrl: {
247
+ type: StringConstructor;
248
+ default: string;
249
+ };
250
+ referenceUrl: {
251
+ type: StringConstructor;
252
+ default: string;
253
+ };
254
+ referenceOnly: {
255
+ type: BooleanConstructor;
256
+ default: boolean;
257
+ };
258
+ referenceLabel: {
259
+ type: StringConstructor;
260
+ default: string;
261
+ };
231
262
  maxlength: {
232
263
  type: NumberConstructor;
233
264
  required: boolean;
@@ -241,7 +272,6 @@ declare const _default: import("vue").DefineComponent<{
241
272
  default: undefined;
242
273
  };
243
274
  required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
244
- label: StringConstructor;
245
275
  labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
246
276
  prop: {
247
277
  readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp) | ((new (...args: any[]) => import("element-plus").FormItemProp & {}) | (() => import("element-plus").FormItemProp))[], unknown, unknown>>;
@@ -355,6 +385,7 @@ declare const _default: import("vue").DefineComponent<{
355
385
  }, {
356
386
  required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
357
387
  type: string;
388
+ label: string;
358
389
  labelWidth: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
359
390
  inlineMessage: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, BooleanConstructor], unknown, unknown>;
360
391
  showMessage: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
@@ -379,5 +410,8 @@ declare const _default: import("vue").DefineComponent<{
379
410
  inputSlots: import("../../input/src/types").InputSlots;
380
411
  rows: number;
381
412
  uploadUrl: string;
413
+ referenceUrl: string;
414
+ referenceOnly: boolean;
415
+ referenceLabel: string;
382
416
  }>;
383
417
  export default _default;
@@ -1,4 +1,5 @@
1
1
  import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
2
+ import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
2
3
  import { inputNumberProps, inputNumberEmits, ElInputNumber } from 'element-plus';
3
4
  import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createElementBlock, toDisplayString, createCommentVNode } from 'vue';
4
5
  import { createInputNumberBindProps, createInputNumberOnEmits } from '@vunk/form/shared/element-plus';
@@ -33,7 +34,9 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
33
34
  default: ""
34
35
  }
35
36
  });
37
+ bindPropsFactory(props);
36
38
  const emits = __spreadValues({}, inputNumberEmits);
39
+ onEmitsFactory(emits);
37
40
 
38
41
  var _export_sfc = (sfc, props) => {
39
42
  const target = sfc.__vccOpts || sfc;
@@ -78,6 +78,7 @@ export declare const props: {
78
78
  default: string;
79
79
  };
80
80
  };
81
+ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"step", keyof T2> | Extract<"stepStrictly", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"controls", keyof T2> | Extract<"controlsPosition", keyof T2> | Extract<"valueOnClear", keyof T2> | Extract<"precision", keyof T2> | Extract<"unit", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", 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<"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<"labelPosition", keyof T2>, KE> | Exclude<Extract<"name", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"id", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"validateEvent", keyof T2>, KE> | Exclude<Extract<"step", keyof T2>, KE> | Exclude<Extract<"stepStrictly", keyof T2>, KE> | Exclude<Extract<"max", keyof T2>, KE> | Exclude<Extract<"min", keyof T2>, KE> | Exclude<Extract<"controls", keyof T2>, KE> | Exclude<Extract<"controlsPosition", keyof T2>, KE> | Exclude<Extract<"valueOnClear", keyof T2>, KE> | Exclude<Extract<"precision", keyof T2>, KE> | Exclude<Extract<"unit", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"step", keyof T2> | Extract<"stepStrictly", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"controls", keyof T2> | Extract<"controlsPosition", keyof T2> | Extract<"valueOnClear", keyof T2> | Extract<"precision", keyof T2> | Extract<"unit", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", 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<"size", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"name", keyof T2> | Extract<"disabled", keyof T2> | Extract<"id", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"step", keyof T2> | Extract<"stepStrictly", keyof T2> | Extract<"max", keyof T2> | Extract<"min", keyof T2> | Extract<"controls", keyof T2> | Extract<"controlsPosition", keyof T2> | Extract<"valueOnClear", keyof T2> | Extract<"precision", keyof T2> | Extract<"unit", keyof T2>]: T2[k]; }[P]; }>;
81
82
  export declare const emits: {
82
83
  change: (cur: number | undefined, prev: number | undefined) => boolean;
83
84
  blur: (e: FocusEvent) => boolean;
@@ -85,3 +86,10 @@ export declare const emits: {
85
86
  input: (val: number | null | undefined) => boolean;
86
87
  "update:modelValue": (val: number | undefined) => boolean;
87
88
  };
89
+ export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("update:modelValue" | "input" | "change" | "focus" | "blur")[] | undefined>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue", KE> | Exclude<"input", KE> | Exclude<"change", KE> | Exclude<"focus", KE> | Exclude<"blur", KE> : "update:modelValue" | "input" | "change" | "focus" | "blur"]: {
90
+ change: (...e: import("@vunk/core").RestParameters<T2>) => void;
91
+ blur: (...e: import("@vunk/core").RestParameters<T2>) => void;
92
+ focus: (...e: import("@vunk/core").RestParameters<T2>) => void;
93
+ input: (...e: import("@vunk/core").RestParameters<T2>) => void;
94
+ "update:modelValue": (...e: import("@vunk/core").RestParameters<T2>) => void;
95
+ }[P]; };
@@ -1,4 +1,5 @@
1
1
  import { _VkfFormItemCtx } from '@vunk/form/components/form-item';
2
+ import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
2
3
  import { inputNumberProps, inputNumberEmits } from 'element-plus';
3
4
 
4
5
  var __defProp = Object.defineProperty;
@@ -30,6 +31,8 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
30
31
  default: ""
31
32
  }
32
33
  });
34
+ const createBindProps = bindPropsFactory(props);
33
35
  const emits = __spreadValues({}, inputNumberEmits);
36
+ const createOnEmits = onEmitsFactory(emits);
34
37
 
35
- export { emits, props };
38
+ export { createBindProps, createOnEmits, emits, props };
@@ -0,0 +1,4 @@
1
+ import VkfSlider from './src/index.vue.d';
2
+ export * as __VkfSlider from './src/types';
3
+ export { VkfSlider, };
4
+ export default VkfSlider;
@@ -0,0 +1,99 @@
1
+ import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
2
+ import { sliderProps, sliderEmits, ElSlider } from 'element-plus';
3
+ import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, renderSlot } from 'vue';
4
+ import { useComputedReadonly } from '@vunk/form/composables';
5
+ import { createSliderBindProps, createSliderOnEmits } from '@vunk/form/shared/element-plus';
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __defProps = Object.defineProperties;
9
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
10
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
11
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
12
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __spreadValues = (a, b) => {
15
+ for (var prop in b || (b = {}))
16
+ if (__hasOwnProp.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ if (__getOwnPropSymbols)
19
+ for (var prop of __getOwnPropSymbols(b)) {
20
+ if (__propIsEnum.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ }
23
+ return a;
24
+ };
25
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
+ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.props), sliderProps), {
27
+ modelValue: {
28
+ type: [],
29
+ default: void 0
30
+ },
31
+ defaultModelValue: null
32
+ });
33
+ const emits = __spreadValues({}, sliderEmits);
34
+
35
+ var _export_sfc = (sfc, props) => {
36
+ const target = sfc.__vccOpts || sfc;
37
+ for (const [key, val] of props) {
38
+ target[key] = val;
39
+ }
40
+ return target;
41
+ };
42
+
43
+ const _sfc_main = defineComponent({
44
+ name: "VkfSlider",
45
+ components: {
46
+ ElSlider,
47
+ VkfFormItem
48
+ },
49
+ emits,
50
+ props,
51
+ setup(props2, { emit }) {
52
+ const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
53
+ const readonly = useComputedReadonly(props2);
54
+ const coreProps = createSliderBindProps(props2, [
55
+ "modelValue",
56
+ "disabled"
57
+ ]);
58
+ const coreEmits = createSliderOnEmits(emit);
59
+ return {
60
+ readonly,
61
+ formItemBindProps,
62
+ coreProps,
63
+ coreEmits
64
+ };
65
+ }
66
+ });
67
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
68
+ const _component_ElSlider = resolveComponent("ElSlider");
69
+ const _component_VkfFormItem = resolveComponent("VkfFormItem");
70
+ return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
71
+ default: withCtx(() => [
72
+ createVNode(_component_ElSlider, mergeProps({
73
+ class: {
74
+ "is-readonly": _ctx.readonly
75
+ }
76
+ }, _ctx.coreProps, toHandlers(_ctx.coreEmits), {
77
+ "model-value": _ctx.modelValue ?? _ctx.defaultModelValue,
78
+ disabled: _ctx.readonly || _ctx.disabled
79
+ }), {
80
+ default: withCtx(() => [
81
+ renderSlot(_ctx.$slots, "default")
82
+ ]),
83
+ _: 3
84
+ }, 16, ["class", "model-value", "disabled"])
85
+ ]),
86
+ _: 3
87
+ }, 16);
88
+ }
89
+ var VkfSlider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "index.vue"]]);
90
+
91
+ var types = /*#__PURE__*/Object.freeze({
92
+ __proto__: null
93
+ });
94
+
95
+ VkfSlider.install = (app) => {
96
+ app.component(VkfSlider.name, VkfSlider);
97
+ };
98
+
99
+ export { VkfSlider, types as __VkfSlider, VkfSlider as default };