@minilo/ui 0.0.1

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 (165) hide show
  1. package/README.md +44 -0
  2. package/minilo/dist/index.css +1 -0
  3. package/minilo/dist/index.full.js +7054 -0
  4. package/minilo/dist/index.full.min.js +2 -0
  5. package/minilo/dist/index.full.min.js.map +1 -0
  6. package/minilo/dist/index.full.min.mjs +2 -0
  7. package/minilo/dist/index.full.min.mjs.map +1 -0
  8. package/minilo/dist/index.full.mjs +7041 -0
  9. package/minilo/es/components/button/index.d.ts +47 -0
  10. package/minilo/es/components/button/index.mjs +6 -0
  11. package/minilo/es/components/button/index.vue.d.ts +29 -0
  12. package/minilo/es/components/button/index.vue.mjs +5 -0
  13. package/minilo/es/components/button/index.vue2.mjs +67 -0
  14. package/minilo/es/components/button/type.d.ts +10 -0
  15. package/minilo/es/components/button/type.mjs +1 -0
  16. package/minilo/es/components/chart/index.d.ts +49 -0
  17. package/minilo/es/components/chart/index.mjs +6 -0
  18. package/minilo/es/components/chart/index.vue.d.ts +33 -0
  19. package/minilo/es/components/chart/index.vue.mjs +5 -0
  20. package/minilo/es/components/chart/index.vue2.mjs +124 -0
  21. package/minilo/es/components/chart/type.d.ts +7 -0
  22. package/minilo/es/components/chart/type.mjs +1 -0
  23. package/minilo/es/components/detail/index.d.ts +37 -0
  24. package/minilo/es/components/detail/index.mjs +6 -0
  25. package/minilo/es/components/detail/index.vue.d.ts +23 -0
  26. package/minilo/es/components/detail/index.vue.mjs +5 -0
  27. package/minilo/es/components/detail/index.vue2.mjs +194 -0
  28. package/minilo/es/components/detail/renderLabel.vue.d.ts +8 -0
  29. package/minilo/es/components/detail/renderLabel.vue.mjs +5 -0
  30. package/minilo/es/components/detail/renderLabel.vue2.mjs +23 -0
  31. package/minilo/es/components/detail/renderTooltip.vue.d.ts +8 -0
  32. package/minilo/es/components/detail/renderTooltip.vue.mjs +5 -0
  33. package/minilo/es/components/detail/renderTooltip.vue2.mjs +23 -0
  34. package/minilo/es/components/detail/type.d.ts +27 -0
  35. package/minilo/es/components/detail/type.mjs +1 -0
  36. package/minilo/es/components/index.d.ts +7 -0
  37. package/minilo/es/components/index.mjs +7 -0
  38. package/minilo/es/components/number-range-input/index.d.ts +41 -0
  39. package/minilo/es/components/number-range-input/index.mjs +6 -0
  40. package/minilo/es/components/number-range-input/index.vue.d.ts +33 -0
  41. package/minilo/es/components/number-range-input/index.vue.mjs +5 -0
  42. package/minilo/es/components/number-range-input/index.vue2.mjs +150 -0
  43. package/minilo/es/components/number-range-input/props.d.ts +10 -0
  44. package/minilo/es/components/number-range-input/props.mjs +1 -0
  45. package/minilo/es/components/search/index.d.ts +586 -0
  46. package/minilo/es/components/search/index.mjs +6 -0
  47. package/minilo/es/components/search/index.vue.d.ts +750 -0
  48. package/minilo/es/components/search/index.vue.mjs +5 -0
  49. package/minilo/es/components/search/index.vue2.mjs +298 -0
  50. package/minilo/es/components/search/props.d.ts +107 -0
  51. package/minilo/es/components/search/props.mjs +55 -0
  52. package/minilo/es/components/search-table/index.d.ts +274 -0
  53. package/minilo/es/components/search-table/index.mjs +6 -0
  54. package/minilo/es/components/search-table/index.vue.d.ts +173 -0
  55. package/minilo/es/components/search-table/index.vue.mjs +5 -0
  56. package/minilo/es/components/search-table/index.vue2.mjs +195 -0
  57. package/minilo/es/components/search-table/props.d.ts +69 -0
  58. package/minilo/es/components/search-table/props.mjs +69 -0
  59. package/minilo/es/components/search-table/render.d.ts +11 -0
  60. package/minilo/es/components/search-table/render.mjs +19 -0
  61. package/minilo/es/components/virtual-list/index.d.ts +59 -0
  62. package/minilo/es/components/virtual-list/index.mjs +6 -0
  63. package/minilo/es/components/virtual-list/index.vue.d.ts +39 -0
  64. package/minilo/es/components/virtual-list/index.vue.mjs +5 -0
  65. package/minilo/es/components/virtual-list/index.vue2.mjs +421 -0
  66. package/minilo/es/components/virtual-list/type.d.ts +20 -0
  67. package/minilo/es/components/virtual-list/type.mjs +1 -0
  68. package/minilo/es/index.d.ts +1087 -0
  69. package/minilo/es/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.17_typescript@5.8.3_/node_modules/@element-plus/icons-vue/dist/index.mjs +25 -0
  70. package/minilo/es/node_modules/.pnpm/@vueuse_core@13.6.0_vue@3.5.17_typescript@5.9.3_/node_modules/@vueuse/core/index.mjs +73 -0
  71. package/minilo/es/node_modules/.pnpm/@vueuse_shared@13.6.0_vue@3.5.17_typescript@5.9.3_/node_modules/@vueuse/shared/index.mjs +76 -0
  72. package/minilo/es/packages/utils/dist/func/common.mjs +14 -0
  73. package/minilo/es/packages/utils/dist/request/index.mjs +110 -0
  74. package/minilo/es/resolver/index.d.ts +8 -0
  75. package/minilo/es/resolver/index.mjs +26 -0
  76. package/minilo/es/utils/index.d.ts +28 -0
  77. package/minilo/es/utils/index.mjs +30 -0
  78. package/minilo/lib/components/button/index.d.ts +47 -0
  79. package/minilo/lib/components/button/index.js +11 -0
  80. package/minilo/lib/components/button/index.vue.d.ts +29 -0
  81. package/minilo/lib/components/button/index.vue.js +9 -0
  82. package/minilo/lib/components/button/index.vue2.js +71 -0
  83. package/minilo/lib/components/button/type.d.ts +10 -0
  84. package/minilo/lib/components/button/type.js +2 -0
  85. package/minilo/lib/components/chart/index.d.ts +49 -0
  86. package/minilo/lib/components/chart/index.js +11 -0
  87. package/minilo/lib/components/chart/index.vue.d.ts +33 -0
  88. package/minilo/lib/components/chart/index.vue.js +9 -0
  89. package/minilo/lib/components/chart/index.vue2.js +128 -0
  90. package/minilo/lib/components/chart/type.d.ts +7 -0
  91. package/minilo/lib/components/chart/type.js +2 -0
  92. package/minilo/lib/components/detail/index.d.ts +37 -0
  93. package/minilo/lib/components/detail/index.js +11 -0
  94. package/minilo/lib/components/detail/index.vue.d.ts +23 -0
  95. package/minilo/lib/components/detail/index.vue.js +9 -0
  96. package/minilo/lib/components/detail/index.vue2.js +198 -0
  97. package/minilo/lib/components/detail/renderLabel.vue.d.ts +8 -0
  98. package/minilo/lib/components/detail/renderLabel.vue.js +9 -0
  99. package/minilo/lib/components/detail/renderLabel.vue2.js +27 -0
  100. package/minilo/lib/components/detail/renderTooltip.vue.d.ts +8 -0
  101. package/minilo/lib/components/detail/renderTooltip.vue.js +9 -0
  102. package/minilo/lib/components/detail/renderTooltip.vue2.js +27 -0
  103. package/minilo/lib/components/detail/type.d.ts +27 -0
  104. package/minilo/lib/components/detail/type.js +2 -0
  105. package/minilo/lib/components/index.d.ts +7 -0
  106. package/minilo/lib/components/index.js +19 -0
  107. package/minilo/lib/components/number-range-input/index.d.ts +41 -0
  108. package/minilo/lib/components/number-range-input/index.js +11 -0
  109. package/minilo/lib/components/number-range-input/index.vue.d.ts +33 -0
  110. package/minilo/lib/components/number-range-input/index.vue.js +9 -0
  111. package/minilo/lib/components/number-range-input/index.vue2.js +154 -0
  112. package/minilo/lib/components/number-range-input/props.d.ts +10 -0
  113. package/minilo/lib/components/number-range-input/props.js +2 -0
  114. package/minilo/lib/components/search/index.d.ts +586 -0
  115. package/minilo/lib/components/search/index.js +11 -0
  116. package/minilo/lib/components/search/index.vue.d.ts +750 -0
  117. package/minilo/lib/components/search/index.vue.js +9 -0
  118. package/minilo/lib/components/search/index.vue2.js +302 -0
  119. package/minilo/lib/components/search/props.d.ts +107 -0
  120. package/minilo/lib/components/search/props.js +58 -0
  121. package/minilo/lib/components/search-table/index.d.ts +274 -0
  122. package/minilo/lib/components/search-table/index.js +11 -0
  123. package/minilo/lib/components/search-table/index.vue.d.ts +173 -0
  124. package/minilo/lib/components/search-table/index.vue.js +9 -0
  125. package/minilo/lib/components/search-table/index.vue2.js +199 -0
  126. package/minilo/lib/components/search-table/props.d.ts +69 -0
  127. package/minilo/lib/components/search-table/props.js +72 -0
  128. package/minilo/lib/components/search-table/render.d.ts +11 -0
  129. package/minilo/lib/components/search-table/render.js +23 -0
  130. package/minilo/lib/components/virtual-list/index.d.ts +59 -0
  131. package/minilo/lib/components/virtual-list/index.js +11 -0
  132. package/minilo/lib/components/virtual-list/index.vue.d.ts +39 -0
  133. package/minilo/lib/components/virtual-list/index.vue.js +9 -0
  134. package/minilo/lib/components/virtual-list/index.vue2.js +425 -0
  135. package/minilo/lib/components/virtual-list/type.d.ts +20 -0
  136. package/minilo/lib/components/virtual-list/type.js +2 -0
  137. package/minilo/lib/index.d.ts +1087 -0
  138. package/minilo/lib/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.17_typescript@5.8.3_/node_modules/@element-plus/icons-vue/dist/index.js +27 -0
  139. package/minilo/lib/node_modules/.pnpm/@vueuse_core@13.6.0_vue@3.5.17_typescript@5.9.3_/node_modules/@vueuse/core/index.js +84 -0
  140. package/minilo/lib/node_modules/.pnpm/@vueuse_shared@13.6.0_vue@3.5.17_typescript@5.9.3_/node_modules/@vueuse/shared/index.js +83 -0
  141. package/minilo/lib/packages/utils/dist/func/common.js +16 -0
  142. package/minilo/lib/packages/utils/dist/request/index.js +120 -0
  143. package/minilo/lib/resolver/index.d.ts +8 -0
  144. package/minilo/lib/resolver/index.js +28 -0
  145. package/minilo/lib/utils/index.d.ts +28 -0
  146. package/minilo/lib/utils/index.js +34 -0
  147. package/minilo/theme-chalk/index.css +1 -0
  148. package/minilo/theme-chalk/ml-button.css +1 -0
  149. package/minilo/theme-chalk/ml-chart.css +1 -0
  150. package/minilo/theme-chalk/ml-detail.css +1 -0
  151. package/minilo/theme-chalk/ml-number-range-input.css +1 -0
  152. package/minilo/theme-chalk/ml-search-table.css +1 -0
  153. package/minilo/theme-chalk/ml-search.css +1 -0
  154. package/minilo/theme-chalk/ml-virtual-list.css +1 -0
  155. package/minilo/theme-chalk/src/button.scss +22 -0
  156. package/minilo/theme-chalk/src/chart.scss +11 -0
  157. package/minilo/theme-chalk/src/default/variable.scss +1 -0
  158. package/minilo/theme-chalk/src/detail.scss +9 -0
  159. package/minilo/theme-chalk/src/index.scss +12 -0
  160. package/minilo/theme-chalk/src/mixins/mixin.scss +273 -0
  161. package/minilo/theme-chalk/src/number-range-input.scss +9 -0
  162. package/minilo/theme-chalk/src/search-table.scss +47 -0
  163. package/minilo/theme-chalk/src/search.scss +20 -0
  164. package/minilo/theme-chalk/src/virtual-list.scss +49 -0
  165. package/package.json +107 -0
@@ -0,0 +1,194 @@
1
+ import { defineComponent, resolveComponent, createBlock, openBlock, unref, mergeProps, withCtx, createElementBlock, Fragment, renderList, renderSlot, normalizeClass, createSlots, createElementVNode, createVNode, toDisplayString, createTextVNode, createCommentVNode, normalizeStyle } from 'vue';
2
+ import { ElDescriptions, ElDescriptionsItem } from 'element-plus';
3
+ import _sfc_main$1 from './renderTooltip.vue2.mjs';
4
+ import _sfc_main$2 from './renderLabel.vue2.mjs';
5
+ import { Warning as warning_default } from '../../node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.17_typescript@5.8.3_/node_modules/@element-plus/icons-vue/dist/index.mjs';
6
+ import { bem } from '../../utils/index.mjs';
7
+
8
+ const _hoisted_1 = { key: 0 };
9
+ const _hoisted_2 = { key: 0 };
10
+ const _hoisted_3 = { key: 1 };
11
+ const _hoisted_4 = { key: 0 };
12
+ const _hoisted_5 = { key: 0 };
13
+ const _hoisted_6 = { key: 1 };
14
+ const _hoisted_7 = { key: 0 };
15
+ const _hoisted_8 = { key: 1 };
16
+ const _hoisted_9 = { key: 0 };
17
+ var _sfc_main = /* @__PURE__ */ defineComponent({
18
+ ...{
19
+ name: "MlDetail"
20
+ },
21
+ __name: "index",
22
+ props: {
23
+ descColumn: { type: Number, required: false, default: 4 },
24
+ dataList: { type: Object, required: false, default: () => ({}) },
25
+ listTypeInfo: { type: Object, required: false, default: () => ({}) },
26
+ descData: { type: Array, required: true, default: () => [] },
27
+ isColon: { type: Boolean, required: false, default: true },
28
+ isLabelBold: { type: Boolean, required: false, default: true }
29
+ },
30
+ setup(__props) {
31
+ const constantEscape = (value, list, key = "value", label = "label") => {
32
+ const res = list.find((item) => item[key] === value);
33
+ return res?.[label];
34
+ };
35
+ return (_ctx, _cache) => {
36
+ const _component_el_icon = resolveComponent("el-icon");
37
+ const _component_el_tooltip = resolveComponent("el-tooltip");
38
+ return openBlock(), createBlock(unref(ElDescriptions), mergeProps({
39
+ class: unref(bem)("detail")
40
+ }, _ctx.$attrs, { column: __props.descColumn }), {
41
+ default: withCtx(() => [
42
+ (openBlock(true), createElementBlock(
43
+ Fragment,
44
+ null,
45
+ renderList(__props.descData, (item, key) => {
46
+ return openBlock(), createBlock(unref(ElDescriptionsItem), mergeProps({
47
+ key,
48
+ span: item.span || 1
49
+ }, { ref_for: true }, { ...item.bind, ..._ctx.$attrs }), {
50
+ label: withCtx(() => [
51
+ item.labelRender ? (openBlock(), createBlock(_sfc_main$2, {
52
+ key: 0,
53
+ render: item.labelRender,
54
+ item
55
+ }, null, 8, ["render", "item"])) : (openBlock(), createElementBlock(
56
+ "span",
57
+ {
58
+ key: 1,
59
+ style: normalizeStyle({ fontWeight: __props.isLabelBold ? "bold" : "" })
60
+ },
61
+ [
62
+ createTextVNode(
63
+ toDisplayString(item.label),
64
+ 1
65
+ /* TEXT */
66
+ ),
67
+ __props.isColon ? (openBlock(), createElementBlock("span", _hoisted_1, "\uFF1A")) : createCommentVNode("v-if", true)
68
+ ],
69
+ 4
70
+ /* STYLE */
71
+ ))
72
+ ]),
73
+ default: withCtx(() => [
74
+ item.slotName ? renderSlot(_ctx.$slots, item.slotName, { key: 0 }) : (openBlock(), createElementBlock(
75
+ "span",
76
+ {
77
+ key: 1,
78
+ class: normalizeClass(unref(bem)("detail", "tip"))
79
+ },
80
+ [
81
+ item.tooltip ? (openBlock(), createBlock(_component_el_tooltip, mergeProps({
82
+ key: 0,
83
+ ref_for: true
84
+ }, _ctx.$attrs, {
85
+ placement: item.placement || "bottom"
86
+ }), createSlots({
87
+ default: withCtx(() => [
88
+ createElementVNode("span", null, [
89
+ item.filters && item.filters.list ? (openBlock(), createElementBlock(
90
+ "span",
91
+ _hoisted_2,
92
+ toDisplayString(constantEscape(
93
+ item.fieldName ? __props.dataList[item.fieldName] : void 0,
94
+ __props.listTypeInfo[item.filters.list],
95
+ item.filters.key || "value",
96
+ item.filters.label || "label"
97
+ )),
98
+ 1
99
+ /* TEXT */
100
+ )) : (openBlock(), createElementBlock("span", _hoisted_3, [
101
+ createTextVNode(
102
+ toDisplayString(item.value),
103
+ 1
104
+ /* TEXT */
105
+ ),
106
+ item.unit && item.value ? (openBlock(), createElementBlock(
107
+ "span",
108
+ _hoisted_4,
109
+ toDisplayString(item.unit),
110
+ 1
111
+ /* TEXT */
112
+ )) : createCommentVNode("v-if", true)
113
+ ])),
114
+ createVNode(_component_el_icon, {
115
+ size: item.iconSize,
116
+ color: item.iconColor,
117
+ style: { "cursor": "pointer", "margin-left": "2px", "top": "1px" }
118
+ }, {
119
+ default: withCtx(() => [
120
+ createVNode(unref(warning_default))
121
+ ]),
122
+ _: 1
123
+ /* STABLE */
124
+ }, 8, ["size", "color"])
125
+ ])
126
+ ]),
127
+ _: 2
128
+ /* DYNAMIC */
129
+ }, [
130
+ item.tooltip ? {
131
+ name: "content",
132
+ fn: withCtx(() => [
133
+ typeof item.tooltip === "string" ? (openBlock(), createElementBlock(
134
+ "span",
135
+ _hoisted_5,
136
+ toDisplayString(item.tooltip),
137
+ 1
138
+ /* TEXT */
139
+ )) : typeof item.tooltip === "function" ? (openBlock(), createBlock(_sfc_main$1, {
140
+ key: 1,
141
+ render: item.tooltip,
142
+ item
143
+ }, null, 8, ["render", "item"])) : createCommentVNode("v-if", true)
144
+ ]),
145
+ key: "0"
146
+ } : void 0
147
+ ]), 1040, ["placement"])) : (openBlock(), createElementBlock("span", _hoisted_6, [
148
+ item.filters && item.filters.list ? (openBlock(), createElementBlock(
149
+ "span",
150
+ _hoisted_7,
151
+ toDisplayString(constantEscape(
152
+ item.fieldName ? __props.dataList[item.fieldName] : void 0,
153
+ __props.listTypeInfo[item.filters.list],
154
+ item.filters.key || "value",
155
+ item.filters.label || "label"
156
+ )),
157
+ 1
158
+ /* TEXT */
159
+ )) : (openBlock(), createElementBlock("span", _hoisted_8, [
160
+ createTextVNode(
161
+ toDisplayString(item.value),
162
+ 1
163
+ /* TEXT */
164
+ ),
165
+ item.unit && item.value ? (openBlock(), createElementBlock(
166
+ "span",
167
+ _hoisted_9,
168
+ toDisplayString(item.unit),
169
+ 1
170
+ /* TEXT */
171
+ )) : createCommentVNode("v-if", true)
172
+ ]))
173
+ ]))
174
+ ],
175
+ 2
176
+ /* CLASS */
177
+ ))
178
+ ]),
179
+ _: 2
180
+ /* DYNAMIC */
181
+ }, 1040, ["span"]);
182
+ }),
183
+ 128
184
+ /* KEYED_FRAGMENT */
185
+ ))
186
+ ]),
187
+ _: 3
188
+ /* FORWARDED */
189
+ }, 16, ["class", "column"]);
190
+ };
191
+ }
192
+ });
193
+
194
+ export { _sfc_main as default };
@@ -0,0 +1,8 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ render: FunctionConstructor;
3
+ item: ObjectConstructor;
4
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
5
+ render: FunctionConstructor;
6
+ item: ObjectConstructor;
7
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './renderLabel.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,23 @@
1
+ import { defineComponent, createBlock, openBlock, resolveDynamicComponent } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{
5
+ name: "RenderLabel"
6
+ },
7
+ __name: "renderLabel",
8
+ props: {
9
+ render: Function,
10
+ item: Object
11
+ },
12
+ setup(__props) {
13
+ const props = __props;
14
+ const renderComponent = () => {
15
+ return props.render(props?.item);
16
+ };
17
+ return (_ctx, _cache) => {
18
+ return openBlock(), createBlock(resolveDynamicComponent(renderComponent));
19
+ };
20
+ }
21
+ });
22
+
23
+ export { _sfc_main as default };
@@ -0,0 +1,8 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ render: FunctionConstructor;
3
+ item: ObjectConstructor;
4
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
5
+ render: FunctionConstructor;
6
+ item: ObjectConstructor;
7
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './renderTooltip.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,23 @@
1
+ import { defineComponent, createBlock, openBlock, resolveDynamicComponent } from 'vue';
2
+
3
+ var _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{
5
+ name: "RenderTooltip"
6
+ },
7
+ __name: "renderTooltip",
8
+ props: {
9
+ render: Function,
10
+ item: Object
11
+ },
12
+ setup(__props) {
13
+ const props = __props;
14
+ const renderComponent = () => {
15
+ return props.render(props?.item);
16
+ };
17
+ return (_ctx, _cache) => {
18
+ return openBlock(), createBlock(resolveDynamicComponent(renderComponent));
19
+ };
20
+ }
21
+ });
22
+
23
+ export { _sfc_main as default };
@@ -0,0 +1,27 @@
1
+ export interface DescItem {
2
+ span?: number;
3
+ bind?: Record<string, any>;
4
+ label?: string;
5
+ labelRender?: (item: any) => any;
6
+ slotName?: string;
7
+ tooltip?: string | ((item: any) => any);
8
+ placement?: string;
9
+ filters?: {
10
+ list: string;
11
+ key?: string;
12
+ label?: string;
13
+ };
14
+ value?: string | number;
15
+ unit?: string;
16
+ iconSize?: number;
17
+ iconColor?: string;
18
+ fieldName?: string;
19
+ }
20
+ export interface MlDetailProps {
21
+ descColumn?: number;
22
+ dataList?: Record<string, any>;
23
+ listTypeInfo?: Record<string, any>;
24
+ descData: DescItem[];
25
+ isColon?: boolean;
26
+ isLabelBold?: boolean;
27
+ }
@@ -0,0 +1,7 @@
1
+ export * from './chart';
2
+ export * from './search-table';
3
+ export * from './search';
4
+ export * from './detail';
5
+ export * from './button';
6
+ export * from './virtual-list';
7
+ export * from './number-range-input';
@@ -0,0 +1,7 @@
1
+ export { MlChart } from './chart/index.mjs';
2
+ export { MlSearchTable } from './search-table/index.mjs';
3
+ export { MlSearch } from './search/index.mjs';
4
+ export { MlDetail } from './detail/index.mjs';
5
+ export { MlButton } from './button/index.mjs';
6
+ export { MlVirtualList } from './virtual-list/index.mjs';
7
+ export { MlNumberRangeInput } from './number-range-input/index.mjs';
@@ -0,0 +1,41 @@
1
+ export declare const MlNumberRangeInput: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
+ modelValue?: import('./props').NumberRangeValue;
4
+ } & import('./props').NumberRangeInputProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((value: import('./props').NumberRangeValue) => any) | undefined;
6
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:modelValue": (value: import('./props').NumberRangeValue) => any;
8
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
9
+ P: {};
10
+ B: {};
11
+ D: {};
12
+ C: {};
13
+ M: {};
14
+ Defaults: {};
15
+ }, Readonly<{
16
+ modelValue?: import('./props').NumberRangeValue;
17
+ } & import('./props').NumberRangeInputProps> & Readonly<{
18
+ "onUpdate:modelValue"?: ((value: import('./props').NumberRangeValue) => any) | undefined;
19
+ }>, {}, {}, {}, {}, {}>;
20
+ __isFragment?: never;
21
+ __isTeleport?: never;
22
+ __isSuspense?: never;
23
+ } & import('vue').ComponentOptionsBase<Readonly<{
24
+ modelValue?: import('./props').NumberRangeValue;
25
+ } & import('./props').NumberRangeInputProps> & Readonly<{
26
+ "onUpdate:modelValue"?: ((value: import('./props').NumberRangeValue) => any) | undefined;
27
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
+ "update:modelValue": (value: import('./props').NumberRangeValue) => any;
29
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
30
+ $slots: {
31
+ 'min-prefix'?(_: {}): any;
32
+ 'min-suffix'?(_: {}): any;
33
+ 'min-prepend'?(_: {}): any;
34
+ 'min-append'?(_: {}): any;
35
+ 'max-prefix'?(_: {}): any;
36
+ 'max-suffix'?(_: {}): any;
37
+ 'max-prepend'?(_: {}): any;
38
+ 'max-append'?(_: {}): any;
39
+ };
40
+ });
41
+ export default MlNumberRangeInput;
@@ -0,0 +1,6 @@
1
+ import { withInstall } from '../../utils/index.mjs';
2
+ import _sfc_main from './index.vue2.mjs';
3
+
4
+ const MlNumberRangeInput = withInstall(_sfc_main);
5
+
6
+ export { MlNumberRangeInput, MlNumberRangeInput as default };
@@ -0,0 +1,33 @@
1
+ import { NumberRangeInputProps, NumberRangeValue } from './props';
2
+ type __VLS_Props = NumberRangeInputProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: NumberRangeValue;
5
+ } & __VLS_Props;
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ 'min-prefix'?(_: {}): any;
10
+ 'min-suffix'?(_: {}): any;
11
+ 'min-prepend'?(_: {}): any;
12
+ 'min-append'?(_: {}): any;
13
+ 'max-prefix'?(_: {}): any;
14
+ 'max-suffix'?(_: {}): any;
15
+ 'max-prepend'?(_: {}): any;
16
+ 'max-append'?(_: {}): any;
17
+ };
18
+ refs: {};
19
+ rootEl: HTMLDivElement;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ "update:modelValue": (value: NumberRangeValue) => any;
24
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
+ "onUpdate:modelValue"?: ((value: NumberRangeValue) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
27
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
+ export default _default;
29
+ type __VLS_WithTemplateSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './index.vue2.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,150 @@
1
+ import { defineComponent, mergeModels, useSlots, useModel, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, createElementVNode, mergeProps, createSlots, withCtx, renderSlot, toDisplayString } from 'vue';
2
+ import { ElInput } from 'element-plus';
3
+ import { bem } from '../../utils/index.mjs';
4
+
5
+ var _sfc_main = /* @__PURE__ */ defineComponent({
6
+ ...{
7
+ name: "MlNumberRangeInput"
8
+ },
9
+ __name: "index",
10
+ props: /* @__PURE__ */ mergeModels({
11
+ label: { type: String, required: true },
12
+ disabled: { type: Boolean, required: false },
13
+ separator: { type: String, required: false },
14
+ inputProps: { type: Object, required: false },
15
+ minInputProps: { type: Object, required: false },
16
+ maxInputProps: { type: Object, required: false }
17
+ }, {
18
+ "modelValue": { type: Array, ...{ default: () => [null, null] } },
19
+ "modelModifiers": {}
20
+ }),
21
+ emits: ["update:modelValue"],
22
+ setup(__props) {
23
+ const props = __props;
24
+ const slots = useSlots();
25
+ const modelValue = useModel(__props, "modelValue");
26
+ const minValue = computed({
27
+ get: () => modelValue.value?.[0] ?? null,
28
+ set: (val) => {
29
+ modelValue.value = [val, modelValue.value?.[1] ?? null];
30
+ }
31
+ });
32
+ const maxValue = computed({
33
+ get: () => modelValue.value?.[1] ?? null,
34
+ set: (val) => {
35
+ modelValue.value = [modelValue.value?.[0] ?? null, val];
36
+ }
37
+ });
38
+ const mergedMinInputProps = computed(() => ({
39
+ type: "number",
40
+ placeholder: `\u8BF7\u8F93\u5165${props.label}\u6700\u5C0F\u503C`,
41
+ disabled: props.disabled,
42
+ ...props.inputProps,
43
+ ...props.minInputProps
44
+ }));
45
+ const mergedMaxInputProps = computed(() => ({
46
+ type: "number",
47
+ placeholder: `\u8BF7\u8F93\u5165${props.label}\u6700\u5927\u503C`,
48
+ disabled: props.disabled,
49
+ ...props.inputProps,
50
+ ...props.maxInputProps
51
+ }));
52
+ return (_ctx, _cache) => {
53
+ return openBlock(), createElementBlock(
54
+ "div",
55
+ {
56
+ class: normalizeClass(unref(bem)("number-range-input"))
57
+ },
58
+ [
59
+ createVNode(unref(ElInput), mergeProps({
60
+ modelValue: minValue.value,
61
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => minValue.value = $event),
62
+ modelModifiers: { number: true }
63
+ }, mergedMinInputProps.value), createSlots({
64
+ _: 2
65
+ /* DYNAMIC */
66
+ }, [
67
+ unref(slots)["min-prefix"] ? {
68
+ name: "prefix",
69
+ fn: withCtx(() => [
70
+ renderSlot(_ctx.$slots, "min-prefix")
71
+ ]),
72
+ key: "0"
73
+ } : void 0,
74
+ unref(slots)["min-suffix"] ? {
75
+ name: "suffix",
76
+ fn: withCtx(() => [
77
+ renderSlot(_ctx.$slots, "min-suffix")
78
+ ]),
79
+ key: "1"
80
+ } : void 0,
81
+ unref(slots)["min-prepend"] ? {
82
+ name: "prepend",
83
+ fn: withCtx(() => [
84
+ renderSlot(_ctx.$slots, "min-prepend")
85
+ ]),
86
+ key: "2"
87
+ } : void 0,
88
+ unref(slots)["min-append"] ? {
89
+ name: "append",
90
+ fn: withCtx(() => [
91
+ renderSlot(_ctx.$slots, "min-append")
92
+ ]),
93
+ key: "3"
94
+ } : void 0
95
+ ]), 1040, ["modelValue"]),
96
+ createElementVNode(
97
+ "span",
98
+ {
99
+ class: normalizeClass(unref(bem)("number-range-input", "separator"))
100
+ },
101
+ toDisplayString(props.separator || "\u81F3"),
102
+ 3
103
+ /* TEXT, CLASS */
104
+ ),
105
+ createVNode(unref(ElInput), mergeProps({
106
+ modelValue: maxValue.value,
107
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => maxValue.value = $event),
108
+ modelModifiers: { number: true }
109
+ }, mergedMaxInputProps.value), createSlots({
110
+ _: 2
111
+ /* DYNAMIC */
112
+ }, [
113
+ unref(slots)["max-prefix"] ? {
114
+ name: "prefix",
115
+ fn: withCtx(() => [
116
+ renderSlot(_ctx.$slots, "max-prefix")
117
+ ]),
118
+ key: "0"
119
+ } : void 0,
120
+ unref(slots)["max-suffix"] ? {
121
+ name: "suffix",
122
+ fn: withCtx(() => [
123
+ renderSlot(_ctx.$slots, "max-suffix")
124
+ ]),
125
+ key: "1"
126
+ } : void 0,
127
+ unref(slots)["max-prepend"] ? {
128
+ name: "prepend",
129
+ fn: withCtx(() => [
130
+ renderSlot(_ctx.$slots, "max-prepend")
131
+ ]),
132
+ key: "2"
133
+ } : void 0,
134
+ unref(slots)["max-append"] ? {
135
+ name: "append",
136
+ fn: withCtx(() => [
137
+ renderSlot(_ctx.$slots, "max-append")
138
+ ]),
139
+ key: "3"
140
+ } : void 0
141
+ ]), 1040, ["modelValue"])
142
+ ],
143
+ 2
144
+ /* CLASS */
145
+ );
146
+ };
147
+ }
148
+ });
149
+
150
+ export { _sfc_main as default };
@@ -0,0 +1,10 @@
1
+ import { InputProps } from 'element-plus';
2
+ export type NumberRangeValue = [number | null, number | null];
3
+ export interface NumberRangeInputProps {
4
+ label: string;
5
+ disabled?: boolean;
6
+ separator?: string;
7
+ inputProps?: Partial<InputProps>;
8
+ minInputProps?: Partial<InputProps>;
9
+ maxInputProps?: Partial<InputProps>;
10
+ }