jky-component-lib 0.0.133 → 0.0.139

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.
Files changed (129) hide show
  1. package/dist/es/form/FormItem.vue.js +60 -54
  2. package/dist/es/form/items/AutocompleteItem.vue.d.ts +1 -1
  3. package/dist/es/form/items/AutocompleteItem.vue.js +10 -3
  4. package/dist/es/form/items/CascaderItem.vue.d.ts +1 -1
  5. package/dist/es/form/items/CascaderItem.vue.js +10 -3
  6. package/dist/es/form/items/CheckboxGroupItem.vue.d.ts +3 -1
  7. package/dist/es/form/items/CheckboxGroupItem.vue.js +10 -3
  8. package/dist/es/form/items/ColorPickerItem.vue.d.ts +1 -1
  9. package/dist/es/form/items/ColorPickerItem.vue.js +10 -3
  10. package/dist/es/form/items/ColorPickerPanelItem.vue.d.ts +1 -1
  11. package/dist/es/form/items/ColorPickerPanelItem.vue.js +10 -3
  12. package/dist/es/form/items/DatePickerItem.vue.d.ts +1 -1
  13. package/dist/es/form/items/DatePickerItem.vue.js +10 -3
  14. package/dist/es/form/items/DividerItem.vue.d.ts +3 -1
  15. package/dist/es/form/items/DividerItem.vue.js +10 -3
  16. package/dist/es/form/items/FileUploadItem.vue.d.ts +1 -1
  17. package/dist/es/form/items/FileUploadItem.vue.js +10 -3
  18. package/dist/es/form/items/ImageUploadItem.vue.d.ts +1 -1
  19. package/dist/es/form/items/ImageUploadItem.vue.js +10 -3
  20. package/dist/es/form/items/InputItem.vue.d.ts +1 -1
  21. package/dist/es/form/items/InputItem.vue.js +11 -4
  22. package/dist/es/form/items/InputNumberItem.vue.d.ts +1 -1
  23. package/dist/es/form/items/InputNumberItem.vue.js +10 -3
  24. package/dist/es/form/items/InputTagItem.vue.d.ts +1 -1
  25. package/dist/es/form/items/InputTagItem.vue.js +10 -3
  26. package/dist/es/form/items/LinkedSelectItem.vue.d.ts +4 -1
  27. package/dist/es/form/items/LinkedSelectItem.vue.js +10 -3
  28. package/dist/es/form/items/MentionItem.vue.d.ts +1 -1
  29. package/dist/es/form/items/MentionItem.vue.js +10 -3
  30. package/dist/es/form/items/RadioGroupItem.vue.d.ts +3 -1
  31. package/dist/es/form/items/RadioGroupItem.vue.js +10 -3
  32. package/dist/es/form/items/RangeInputNumberItem.vue.d.ts +13 -0
  33. package/dist/es/form/items/RangeInputNumberItem.vue.js +116 -0
  34. package/dist/es/form/items/RangeInputNumberItem.vue2.js +4 -0
  35. package/dist/es/form/items/RateItem.vue.d.ts +1 -1
  36. package/dist/es/form/items/RateItem.vue.js +10 -3
  37. package/dist/es/form/items/SelectItem.vue.d.ts +1 -1
  38. package/dist/es/form/items/SelectItem.vue.js +10 -3
  39. package/dist/es/form/items/SelectTableItem.vue.d.ts +1 -1
  40. package/dist/es/form/items/SelectTableItem.vue.js +10 -3
  41. package/dist/es/form/items/SelectV2Item.vue.d.ts +1 -1
  42. package/dist/es/form/items/SelectV2Item.vue.js +10 -3
  43. package/dist/es/form/items/SliderItem.vue.d.ts +1 -1
  44. package/dist/es/form/items/SliderItem.vue.js +10 -3
  45. package/dist/es/form/items/SwitchItem.vue.d.ts +1 -1
  46. package/dist/es/form/items/SwitchItem.vue.js +10 -3
  47. package/dist/es/form/items/TextareaItem.vue.d.ts +1 -1
  48. package/dist/es/form/items/TextareaItem.vue.js +10 -3
  49. package/dist/es/form/items/TimePickerItem.vue.d.ts +1 -1
  50. package/dist/es/form/items/TimePickerItem.vue.js +10 -3
  51. package/dist/es/form/items/TimeSelectItem.vue.d.ts +1 -1
  52. package/dist/es/form/items/TimeSelectItem.vue.js +10 -3
  53. package/dist/es/form/items/TransferItem.vue.d.ts +1 -1
  54. package/dist/es/form/items/TransferItem.vue.js +10 -3
  55. package/dist/es/form/items/TreeSelectItem.vue.d.ts +1 -1
  56. package/dist/es/form/items/TreeSelectItem.vue.js +10 -3
  57. package/dist/es/modal/Footer.vue.d.ts +1 -1
  58. package/dist/es/modal/Footer.vue.js +4 -2
  59. package/dist/es/modal/Modal.vue.js +6 -3
  60. package/dist/es/package.json.js +1 -1
  61. package/dist/es/page-header/PageHeader.vue.d.ts +1 -0
  62. package/dist/es/page-header/PageHeader.vue.js +5 -3
  63. package/dist/es/page-table/PageTable.vue.js +1 -1
  64. package/dist/es/page-table/PageTableColumn.vue.d.ts +1 -0
  65. package/dist/lib/form/FormItem.vue.js +9 -3
  66. package/dist/lib/form/items/AutocompleteItem.vue.d.ts +1 -1
  67. package/dist/lib/form/items/AutocompleteItem.vue.js +9 -2
  68. package/dist/lib/form/items/CascaderItem.vue.d.ts +1 -1
  69. package/dist/lib/form/items/CascaderItem.vue.js +9 -2
  70. package/dist/lib/form/items/CheckboxGroupItem.vue.d.ts +3 -1
  71. package/dist/lib/form/items/CheckboxGroupItem.vue.js +9 -2
  72. package/dist/lib/form/items/ColorPickerItem.vue.d.ts +1 -1
  73. package/dist/lib/form/items/ColorPickerItem.vue.js +9 -2
  74. package/dist/lib/form/items/ColorPickerPanelItem.vue.d.ts +1 -1
  75. package/dist/lib/form/items/ColorPickerPanelItem.vue.js +9 -2
  76. package/dist/lib/form/items/DatePickerItem.vue.d.ts +1 -1
  77. package/dist/lib/form/items/DatePickerItem.vue.js +9 -2
  78. package/dist/lib/form/items/DividerItem.vue.d.ts +3 -1
  79. package/dist/lib/form/items/DividerItem.vue.js +9 -2
  80. package/dist/lib/form/items/FileUploadItem.vue.d.ts +1 -1
  81. package/dist/lib/form/items/FileUploadItem.vue.js +9 -2
  82. package/dist/lib/form/items/ImageUploadItem.vue.d.ts +1 -1
  83. package/dist/lib/form/items/ImageUploadItem.vue.js +9 -2
  84. package/dist/lib/form/items/InputItem.vue.d.ts +1 -1
  85. package/dist/lib/form/items/InputItem.vue.js +10 -3
  86. package/dist/lib/form/items/InputNumberItem.vue.d.ts +1 -1
  87. package/dist/lib/form/items/InputNumberItem.vue.js +9 -2
  88. package/dist/lib/form/items/InputTagItem.vue.d.ts +1 -1
  89. package/dist/lib/form/items/InputTagItem.vue.js +9 -2
  90. package/dist/lib/form/items/LinkedSelectItem.vue.d.ts +4 -1
  91. package/dist/lib/form/items/LinkedSelectItem.vue.js +9 -2
  92. package/dist/lib/form/items/MentionItem.vue.d.ts +1 -1
  93. package/dist/lib/form/items/MentionItem.vue.js +9 -2
  94. package/dist/lib/form/items/RadioGroupItem.vue.d.ts +3 -1
  95. package/dist/lib/form/items/RadioGroupItem.vue.js +9 -2
  96. package/dist/lib/form/items/RangeInputNumberItem.vue.d.ts +13 -0
  97. package/dist/lib/form/items/RangeInputNumberItem.vue.js +116 -0
  98. package/dist/lib/form/items/RangeInputNumberItem.vue2.js +4 -0
  99. package/dist/lib/form/items/RateItem.vue.d.ts +1 -1
  100. package/dist/lib/form/items/RateItem.vue.js +9 -2
  101. package/dist/lib/form/items/SelectItem.vue.d.ts +1 -1
  102. package/dist/lib/form/items/SelectItem.vue.js +9 -2
  103. package/dist/lib/form/items/SelectTableItem.vue.d.ts +1 -1
  104. package/dist/lib/form/items/SelectTableItem.vue.js +9 -2
  105. package/dist/lib/form/items/SelectV2Item.vue.d.ts +1 -1
  106. package/dist/lib/form/items/SelectV2Item.vue.js +9 -2
  107. package/dist/lib/form/items/SliderItem.vue.d.ts +1 -1
  108. package/dist/lib/form/items/SliderItem.vue.js +9 -2
  109. package/dist/lib/form/items/SwitchItem.vue.d.ts +1 -1
  110. package/dist/lib/form/items/SwitchItem.vue.js +9 -2
  111. package/dist/lib/form/items/TextareaItem.vue.d.ts +1 -1
  112. package/dist/lib/form/items/TextareaItem.vue.js +9 -2
  113. package/dist/lib/form/items/TimePickerItem.vue.d.ts +1 -1
  114. package/dist/lib/form/items/TimePickerItem.vue.js +9 -2
  115. package/dist/lib/form/items/TimeSelectItem.vue.d.ts +1 -1
  116. package/dist/lib/form/items/TimeSelectItem.vue.js +9 -2
  117. package/dist/lib/form/items/TransferItem.vue.d.ts +1 -1
  118. package/dist/lib/form/items/TransferItem.vue.js +9 -2
  119. package/dist/lib/form/items/TreeSelectItem.vue.d.ts +1 -1
  120. package/dist/lib/form/items/TreeSelectItem.vue.js +9 -2
  121. package/dist/lib/modal/Footer.vue.d.ts +1 -1
  122. package/dist/lib/modal/Footer.vue.js +4 -2
  123. package/dist/lib/modal/Modal.vue.js +6 -3
  124. package/dist/lib/package.json.js +1 -1
  125. package/dist/lib/page-header/PageHeader.vue.d.ts +1 -0
  126. package/dist/lib/page-header/PageHeader.vue.js +4 -2
  127. package/dist/lib/page-table/PageTable.vue.js +1 -1
  128. package/dist/lib/page-table/PageTableColumn.vue.d.ts +1 -0
  129. package/package.json +3 -6
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  };
8
8
  declare function __VLS_template(): {
9
9
  attrs: Partial<{}>;
10
- slots: any;
10
+ slots: Partial<Record<string, (_: any) => any>>;
11
11
  refs: {};
12
12
  rootEl: any;
13
13
  };
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, createElementVNode, createVNode, createTextVNode, renderList, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
20
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, createElementVNode, createVNode, createTextVNode, renderList, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
21
21
  import { Plus } from "@element-plus/icons-vue";
22
22
  import { ElUpload, ElIcon, ElButton } from "element-plus";
23
23
  const _hoisted_1 = { class: "el-upload__picture-card-wrapper" };
@@ -36,6 +36,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
36
36
  setup(__props, { emit: __emit }) {
37
37
  const props = __props;
38
38
  const emit = __emit;
39
+ const slots = useSlots();
39
40
  const uploadProps = computed(() => {
40
41
  var _a, _b;
41
42
  return __spreadProps(__spreadValues({}, props.componentProps), {
@@ -46,6 +47,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
46
47
  });
47
48
  });
48
49
  const listType = computed(() => props.componentProps.listType || "picture-card");
50
+ function getSlotNames() {
51
+ return Object.keys(slots);
52
+ }
53
+ function getComponentSlotNames() {
54
+ return Object.keys(props.componentSlots || {});
55
+ }
49
56
  return (_ctx, _cache) => {
50
57
  return openBlock(), createBlock(unref(ElUpload), mergeProps(uploadProps.value, {
51
58
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
@@ -75,7 +82,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
75
82
  ]),
76
83
  key: "1"
77
84
  } : void 0,
78
- renderList(Object.keys(_ctx.$slots), (name, index) => {
85
+ renderList(getSlotNames(), (name) => {
79
86
  return {
80
87
  name,
81
88
  fn: withCtx((slotData) => [
@@ -83,7 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
83
90
  ])
84
91
  };
85
92
  }),
86
- renderList(Object.keys(__props.componentSlots || {}), (name) => {
93
+ renderList(getComponentSlotNames(), (name) => {
87
94
  return {
88
95
  name,
89
96
  fn: withCtx((slotData) => [
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  };
8
8
  declare function __VLS_template(): {
9
9
  attrs: Partial<{}>;
10
- slots: any;
10
+ slots: Partial<Record<string, (_: any) => any>>;
11
11
  refs: {};
12
12
  rootEl: any;
13
13
  };
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
20
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
21
21
  import { ElInput } from "element-plus";
22
22
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
23
23
  name: "JkyFormItemInput"
@@ -34,6 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
34
34
  setup(__props, { emit: __emit }) {
35
35
  const props = __props;
36
36
  const emit = __emit;
37
+ const slots = useSlots();
37
38
  const inputProps = computed(() => {
38
39
  var _a, _b, _c;
39
40
  return __spreadProps(__spreadValues({}, props.componentProps), {
@@ -45,19 +46,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
45
46
  class: ["w-full min-w-25", (_c = props.componentProps) == null ? void 0 : _c.class]
46
47
  });
47
48
  });
49
+ function getSlotNames() {
50
+ return Object.keys(slots);
51
+ }
52
+ function getComponentSlotNames() {
53
+ return Object.keys(props.componentSlots || {});
54
+ }
48
55
  return (_ctx, _cache) => {
49
56
  return openBlock(), createBlock(unref(ElInput), mergeProps(inputProps.value, {
50
57
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
51
58
  }), createSlots({ _: 2 }, [
52
- renderList(Object.keys(_ctx.$slots), (name, index) => {
59
+ renderList(getSlotNames(), (name) => {
53
60
  return {
54
61
  name,
55
62
  fn: withCtx((slotData) => [
56
- renderSlot(_ctx.$slots, name, mergeProps(slotData || {}, { key: index }))
63
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotData || {})))
57
64
  ])
58
65
  };
59
66
  }),
60
- renderList(Object.keys(__props.componentSlots || {}), (name) => {
67
+ renderList(getComponentSlotNames(), (name) => {
61
68
  return {
62
69
  name,
63
70
  fn: withCtx((slotData) => [
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  };
8
8
  declare function __VLS_template(): {
9
9
  attrs: Partial<{}>;
10
- slots: any;
10
+ slots: Partial<Record<string, (_: any) => any>>;
11
11
  refs: {};
12
12
  rootEl: any;
13
13
  };
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
20
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
21
21
  import { ElInputNumber } from "element-plus";
22
22
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
23
23
  name: "JkyFormItemInputNumber"
@@ -34,6 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
34
34
  setup(__props, { emit: __emit }) {
35
35
  const props = __props;
36
36
  const emit = __emit;
37
+ const slots = useSlots();
37
38
  const numberModelValue = computed(() => {
38
39
  const val = props.modelValue;
39
40
  return val === "" || val === null || val === void 0 ? null : Number(val);
@@ -46,11 +47,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
46
47
  disabled: (_b = (_a = props.componentProps) == null ? void 0 : _a.disabled) != null ? _b : props.disabled
47
48
  });
48
49
  });
50
+ function getSlotNames() {
51
+ return Object.keys(slots);
52
+ }
53
+ function getComponentSlotNames() {
54
+ return Object.keys(props.componentSlots || {});
55
+ }
49
56
  return (_ctx, _cache) => {
50
57
  return openBlock(), createBlock(unref(ElInputNumber), mergeProps(inputNumberProps.value, {
51
58
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
52
59
  }), createSlots({ _: 2 }, [
53
- renderList(Object.keys(_ctx.$slots), (name, index) => {
60
+ renderList(getSlotNames(), (name) => {
54
61
  return {
55
62
  name,
56
63
  fn: withCtx((slotData) => [
@@ -58,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
58
65
  ])
59
66
  };
60
67
  }),
61
- renderList(Object.keys(__props.componentSlots || {}), (name) => {
68
+ renderList(getComponentSlotNames(), (name) => {
62
69
  return {
63
70
  name,
64
71
  fn: withCtx((slotData) => [
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  };
8
8
  declare function __VLS_template(): {
9
9
  attrs: Partial<{}>;
10
- slots: any;
10
+ slots: Partial<Record<string, (_: any) => any>>;
11
11
  refs: {};
12
12
  rootEl: any;
13
13
  };
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
20
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
21
21
  import { ElInputTag } from "element-plus";
22
22
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
23
23
  name: "JkyFormItemInputTag"
@@ -34,6 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
34
34
  setup(__props, { emit: __emit }) {
35
35
  const props = __props;
36
36
  const emit = __emit;
37
+ const slots = useSlots();
37
38
  const inputTagProps = computed(() => {
38
39
  var _a, _b;
39
40
  return __spreadProps(__spreadValues({}, props.componentProps), {
@@ -41,11 +42,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
41
42
  disabled: (_b = (_a = props.componentProps) == null ? void 0 : _a.disabled) != null ? _b : props.disabled
42
43
  });
43
44
  });
45
+ function getSlotNames() {
46
+ return Object.keys(slots);
47
+ }
48
+ function getComponentSlotNames() {
49
+ return Object.keys(props.componentSlots || {});
50
+ }
44
51
  return (_ctx, _cache) => {
45
52
  return openBlock(), createBlock(unref(ElInputTag), mergeProps(inputTagProps.value, {
46
53
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
47
54
  }), createSlots({ _: 2 }, [
48
- renderList(Object.keys(_ctx.$slots), (name, index) => {
55
+ renderList(getSlotNames(), (name) => {
49
56
  return {
50
57
  name,
51
58
  fn: withCtx((slotData) => [
@@ -53,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
53
60
  ])
54
61
  };
55
62
  }),
56
- renderList(Object.keys(__props.componentSlots || {}), (name) => {
63
+ renderList(getComponentSlotNames(), (name) => {
57
64
  return {
58
65
  name,
59
66
  fn: withCtx((slotData) => [
@@ -8,7 +8,10 @@ type __VLS_Props = {
8
8
  };
9
9
  declare function __VLS_template(): {
10
10
  attrs: Partial<{}>;
11
- slots: any;
11
+ slots: Partial<Record<string, (_: any) => any>> & {
12
+ prefix?(_: {}): any;
13
+ suffix?(_: {}): any;
14
+ };
12
15
  refs: {};
13
16
  rootEl: HTMLDivElement;
14
17
  };
@@ -37,7 +37,7 @@ var __async = (__this, __arguments, generator) => {
37
37
  step((generator = generator.apply(__this, __arguments)).next());
38
38
  });
39
39
  };
40
- import { defineComponent, computed, ref, onMounted, openBlock, createElementBlock, renderSlot, Fragment, renderList, createBlock, unref, mergeProps, createSlots, withCtx, resolveDynamicComponent, watch } from "vue";
40
+ import { defineComponent, useSlots, computed, ref, onMounted, openBlock, createElementBlock, renderSlot, Fragment, renderList, createBlock, unref, mergeProps, createSlots, withCtx, resolveDynamicComponent, watch } from "vue";
41
41
  import { ElSelect, ElOption } from "element-plus";
42
42
  const _hoisted_1 = { class: "flex gap-2" };
43
43
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
@@ -55,6 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
55
55
  setup(__props, { emit: __emit }) {
56
56
  const props = __props;
57
57
  const emit = __emit;
58
+ const slots = useSlots();
58
59
  const config = computed(() => {
59
60
  var _a;
60
61
  return ((_a = props.config) == null ? void 0 : _a.config) || {};
@@ -127,6 +128,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
127
128
  loadOptions(0, void 0);
128
129
  }
129
130
  });
131
+ function getSlotNames() {
132
+ return Object.keys(slots);
133
+ }
134
+ function getComponentSlotNames() {
135
+ return Object.keys(props.componentSlots || {});
136
+ }
130
137
  return (_ctx, _cache) => {
131
138
  return openBlock(), createElementBlock("div", _hoisted_1, [
132
139
  renderSlot(_ctx.$slots, "prefix"),
@@ -157,7 +164,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
157
164
  ]),
158
165
  _: 2
159
166
  }, [
160
- renderList(Object.keys(_ctx.$slots), (name, i) => {
167
+ renderList(getSlotNames(), (name) => {
161
168
  return {
162
169
  name,
163
170
  fn: withCtx((slotData) => [
@@ -165,7 +172,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
165
172
  ])
166
173
  };
167
174
  }),
168
- renderList(Object.keys(__props.componentSlots || {}), (name, i) => {
175
+ renderList(getComponentSlotNames(), (name) => {
169
176
  return {
170
177
  name,
171
178
  fn: withCtx((slotData) => [
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  };
8
8
  declare function __VLS_template(): {
9
9
  attrs: Partial<{}>;
10
- slots: any;
10
+ slots: Partial<Record<string, (_: any) => any>>;
11
11
  refs: {};
12
12
  rootEl: any;
13
13
  };
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
20
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
21
21
  import { ElMention } from "element-plus";
22
22
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
23
23
  name: "JkyFormItemMention"
@@ -34,6 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
34
34
  setup(__props, { emit: __emit }) {
35
35
  const props = __props;
36
36
  const emit = __emit;
37
+ const slots = useSlots();
37
38
  const mentionProps = computed(() => {
38
39
  var _a, _b;
39
40
  return __spreadProps(__spreadValues({}, props.componentProps), {
@@ -41,11 +42,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
41
42
  disabled: (_b = (_a = props.componentProps) == null ? void 0 : _a.disabled) != null ? _b : props.disabled
42
43
  });
43
44
  });
45
+ function getSlotNames() {
46
+ return Object.keys(slots);
47
+ }
48
+ function getComponentSlotNames() {
49
+ return Object.keys(props.componentSlots || {});
50
+ }
44
51
  return (_ctx, _cache) => {
45
52
  return openBlock(), createBlock(unref(ElMention), mergeProps(mentionProps.value, {
46
53
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
47
54
  }), createSlots({ _: 2 }, [
48
- renderList(Object.keys(_ctx.$slots), (name, index) => {
55
+ renderList(getSlotNames(), (name) => {
49
56
  return {
50
57
  name,
51
58
  fn: withCtx((slotData) => [
@@ -53,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
53
60
  ])
54
61
  };
55
62
  }),
56
- renderList(Object.keys(__props.componentSlots || {}), (name) => {
63
+ renderList(getComponentSlotNames(), (name) => {
57
64
  return {
58
65
  name,
59
66
  fn: withCtx((slotData) => [
@@ -7,7 +7,9 @@ type __VLS_Props = {
7
7
  };
8
8
  declare function __VLS_template(): {
9
9
  attrs: Partial<{}>;
10
- slots: any;
10
+ slots: Partial<Record<string, (_: any) => any>> & {
11
+ default?(_: {}): any;
12
+ };
11
13
  refs: {};
12
14
  rootEl: any;
13
15
  };
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
20
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
21
21
  import { ElRadioGroup, ElRadioButton, ElRadio } from "element-plus";
22
22
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
23
23
  name: "JkyFormItemRadioGroup"
@@ -34,6 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
34
34
  setup(__props, { emit: __emit }) {
35
35
  const props = __props;
36
36
  const emit = __emit;
37
+ const slots = useSlots();
37
38
  const radioGroupProps = computed(() => {
38
39
  var _a, _b;
39
40
  return __spreadProps(__spreadValues({}, props.componentProps), {
@@ -43,6 +44,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
43
44
  });
44
45
  const options = computed(() => props.componentProps.options || props.config.options || []);
45
46
  const isButton = computed(() => props.componentProps.button || false);
47
+ function getSlotNames() {
48
+ return Object.keys(slots);
49
+ }
50
+ function getComponentSlotNames() {
51
+ return Object.keys(props.componentSlots || {});
52
+ }
46
53
  return (_ctx, _cache) => {
47
54
  return openBlock(), createBlock(unref(ElRadioGroup), mergeProps(radioGroupProps.value, {
48
55
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
@@ -76,7 +83,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
76
83
  ]),
77
84
  _: 2
78
85
  }, [
79
- renderList(Object.keys(_ctx.$slots), (name, index) => {
86
+ renderList(getSlotNames(), (name) => {
80
87
  return {
81
88
  name,
82
89
  fn: withCtx((slotData) => [
@@ -84,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
84
91
  ])
85
92
  };
86
93
  }),
87
- renderList(Object.keys(__props.componentSlots || {}), (name) => {
94
+ renderList(getComponentSlotNames(), (name) => {
88
95
  return {
89
96
  name,
90
97
  fn: withCtx((slotData) => [
@@ -0,0 +1,13 @@
1
+ type __VLS_Props = {
2
+ modelValue?: any;
3
+ config: any;
4
+ componentProps: any;
5
+ componentSlots?: any;
6
+ disabled?: boolean;
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ "update:modelValue": (value: any) => any;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
13
+ export default _default;
@@ -0,0 +1,116 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, computed, h, openBlock, createElementBlock, createVNode, unref, mergeProps, createBlock, resolveDynamicComponent } from "vue";
21
+ import { ElInputNumber } from "element-plus";
22
+ const _hoisted_1 = { class: "flex items-center gap-2" };
23
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
24
+ name: "JkyFormItemRangeInputNumber"
25
+ }), {
26
+ __name: "RangeInputNumberItem",
27
+ props: {
28
+ modelValue: {},
29
+ config: {},
30
+ componentProps: {},
31
+ componentSlots: {},
32
+ disabled: { type: Boolean }
33
+ },
34
+ emits: ["update:modelValue"],
35
+ setup(__props, { emit: __emit }) {
36
+ const props = __props;
37
+ const emit = __emit;
38
+ function parseModelValue() {
39
+ var _a, _b;
40
+ const val = props.modelValue;
41
+ if (val && typeof val === "object") {
42
+ return {
43
+ min: (_a = val.min) != null ? _a : null,
44
+ max: (_b = val.max) != null ? _b : null
45
+ };
46
+ }
47
+ return { min: null, max: null };
48
+ }
49
+ const rangeProps = computed(() => {
50
+ var _a, _b;
51
+ return __spreadProps(__spreadValues({}, props.componentProps), {
52
+ disabled: (_b = (_a = props.componentProps) == null ? void 0 : _a.disabled) != null ? _b : props.disabled
53
+ });
54
+ });
55
+ const separator = computed(() => {
56
+ var _a;
57
+ const separatorProp = (_a = rangeProps.value.separator) != null ? _a : "~";
58
+ if (typeof separatorProp === "function") {
59
+ return separatorProp();
60
+ } else if (typeof separatorProp === "string") {
61
+ return h("span", {}, separatorProp);
62
+ }
63
+ return separatorProp;
64
+ });
65
+ const minInputProps = computed(() => {
66
+ var _a;
67
+ return __spreadProps(__spreadValues({}, rangeProps.value), {
68
+ modelValue: parseModelValue().min,
69
+ placeholder: rangeProps.value.minPlaceholder || "最小值",
70
+ class: ["flex-1", (_a = rangeProps.value) == null ? void 0 : _a.minClass]
71
+ });
72
+ });
73
+ const maxInputProps = computed(() => {
74
+ var _a;
75
+ return __spreadProps(__spreadValues({}, rangeProps.value), {
76
+ modelValue: parseModelValue().max,
77
+ placeholder: rangeProps.value.maxPlaceholder || "最大值",
78
+ class: ["flex-1", (_a = rangeProps.value) == null ? void 0 : _a.maxClass]
79
+ });
80
+ });
81
+ function handleMinChange(value) {
82
+ const current = parseModelValue();
83
+ const minVal = value != null ? value : null;
84
+ const maxVal = current.max;
85
+ if (minVal !== null && maxVal !== null && minVal > maxVal) {
86
+ return;
87
+ }
88
+ emit("update:modelValue", {
89
+ min: minVal,
90
+ max: maxVal
91
+ });
92
+ }
93
+ function handleMaxChange(value) {
94
+ const current = parseModelValue();
95
+ const minVal = current.min;
96
+ const maxVal = value != null ? value : null;
97
+ if (minVal !== null && maxVal !== null && maxVal < minVal) {
98
+ return;
99
+ }
100
+ emit("update:modelValue", {
101
+ min: minVal,
102
+ max: maxVal
103
+ });
104
+ }
105
+ return (_ctx, _cache) => {
106
+ return openBlock(), createElementBlock("div", _hoisted_1, [
107
+ createVNode(unref(ElInputNumber), mergeProps(minInputProps.value, { "onUpdate:modelValue": handleMinChange }), null, 16),
108
+ (openBlock(), createBlock(resolveDynamicComponent(separator.value))),
109
+ createVNode(unref(ElInputNumber), mergeProps(maxInputProps.value, { "onUpdate:modelValue": handleMaxChange }), null, 16)
110
+ ]);
111
+ };
112
+ }
113
+ }));
114
+ export {
115
+ _sfc_main as default
116
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./RangeInputNumberItem.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  };
8
8
  declare function __VLS_template(): {
9
9
  attrs: Partial<{}>;
10
- slots: any;
10
+ slots: Partial<Record<string, (_: any) => any>>;
11
11
  refs: {};
12
12
  rootEl: any;
13
13
  };
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
20
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
21
21
  import { ElRate } from "element-plus";
22
22
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
23
23
  name: "JkyFormItemRate"
@@ -34,6 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
34
34
  setup(__props, { emit: __emit }) {
35
35
  const props = __props;
36
36
  const emit = __emit;
37
+ const slots = useSlots();
37
38
  const rateProps = computed(() => {
38
39
  var _a, _b;
39
40
  return __spreadProps(__spreadValues({}, props.componentProps), {
@@ -41,11 +42,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
41
42
  disabled: (_b = (_a = props.componentProps) == null ? void 0 : _a.disabled) != null ? _b : props.disabled
42
43
  });
43
44
  });
45
+ function getSlotNames() {
46
+ return Object.keys(slots);
47
+ }
48
+ function getComponentSlotNames() {
49
+ return Object.keys(props.componentSlots || {});
50
+ }
44
51
  return (_ctx, _cache) => {
45
52
  return openBlock(), createBlock(unref(ElRate), mergeProps(rateProps.value, {
46
53
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
47
54
  }), createSlots({ _: 2 }, [
48
- renderList(Object.keys(_ctx.$slots), (name, index) => {
55
+ renderList(getSlotNames(), (name) => {
49
56
  return {
50
57
  name,
51
58
  fn: withCtx((slotData) => [
@@ -53,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
53
60
  ])
54
61
  };
55
62
  }),
56
- renderList(Object.keys(__props.componentSlots || {}), (name) => {
63
+ renderList(getComponentSlotNames(), (name) => {
57
64
  return {
58
65
  name,
59
66
  fn: withCtx((slotData) => [
@@ -7,7 +7,7 @@ type __VLS_Props = {
7
7
  };
8
8
  declare function __VLS_template(): {
9
9
  attrs: Partial<{}>;
10
- slots: any;
10
+ slots: Partial<Record<string, (_: any) => any>>;
11
11
  refs: {};
12
12
  rootEl: any;
13
13
  };
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, createElementBlock, Fragment, renderList, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
20
+ import { defineComponent, useSlots, computed, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, createElementBlock, Fragment, renderList, renderSlot, normalizeProps, guardReactiveProps, resolveDynamicComponent } from "vue";
21
21
  import { ElSelect, ElOption } from "element-plus";
22
22
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
23
23
  name: "JkyFormItemSelect"
@@ -34,6 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
34
34
  setup(__props, { emit: __emit }) {
35
35
  const props = __props;
36
36
  const emit = __emit;
37
+ const slots = useSlots();
37
38
  const selectProps = computed(() => {
38
39
  var _a, _b;
39
40
  return __spreadProps(__spreadValues({}, props.componentProps), {
@@ -43,6 +44,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
43
44
  });
44
45
  });
45
46
  const options = computed(() => props.componentProps.options || props.config.options || []);
47
+ function getSlotNames() {
48
+ return Object.keys(slots);
49
+ }
50
+ function getComponentSlotNames() {
51
+ return Object.keys(props.componentSlots || {});
52
+ }
46
53
  return (_ctx, _cache) => {
47
54
  return openBlock(), createBlock(unref(ElSelect), mergeProps({ class: "min-w-30" }, selectProps.value, {
48
55
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event))
@@ -59,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
59
66
  ]),
60
67
  _: 2
61
68
  }, [
62
- renderList(Object.keys(_ctx.$slots), (name, index) => {
69
+ renderList(getSlotNames(), (name) => {
63
70
  return {
64
71
  name,
65
72
  fn: withCtx((slotData) => [
@@ -67,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
67
74
  ])
68
75
  };
69
76
  }),
70
- renderList(Object.keys(__props.componentSlots || {}), (name) => {
77
+ renderList(getComponentSlotNames(), (name) => {
71
78
  return {
72
79
  name,
73
80
  fn: withCtx((slotData) => [
@@ -8,7 +8,7 @@ type __VLS_Props = {
8
8
  };
9
9
  declare function __VLS_template(): {
10
10
  attrs: Partial<{}>;
11
- slots: any;
11
+ slots: Partial<Record<string, (_: any) => any>>;
12
12
  refs: {
13
13
  tableRef: ({
14
14
  $: import('vue').ComponentInternalInstance;