@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.
- package/README.md +44 -0
- package/minilo/dist/index.css +1 -0
- package/minilo/dist/index.full.js +7054 -0
- package/minilo/dist/index.full.min.js +2 -0
- package/minilo/dist/index.full.min.js.map +1 -0
- package/minilo/dist/index.full.min.mjs +2 -0
- package/minilo/dist/index.full.min.mjs.map +1 -0
- package/minilo/dist/index.full.mjs +7041 -0
- package/minilo/es/components/button/index.d.ts +47 -0
- package/minilo/es/components/button/index.mjs +6 -0
- package/minilo/es/components/button/index.vue.d.ts +29 -0
- package/minilo/es/components/button/index.vue.mjs +5 -0
- package/minilo/es/components/button/index.vue2.mjs +67 -0
- package/minilo/es/components/button/type.d.ts +10 -0
- package/minilo/es/components/button/type.mjs +1 -0
- package/minilo/es/components/chart/index.d.ts +49 -0
- package/minilo/es/components/chart/index.mjs +6 -0
- package/minilo/es/components/chart/index.vue.d.ts +33 -0
- package/minilo/es/components/chart/index.vue.mjs +5 -0
- package/minilo/es/components/chart/index.vue2.mjs +124 -0
- package/minilo/es/components/chart/type.d.ts +7 -0
- package/minilo/es/components/chart/type.mjs +1 -0
- package/minilo/es/components/detail/index.d.ts +37 -0
- package/minilo/es/components/detail/index.mjs +6 -0
- package/minilo/es/components/detail/index.vue.d.ts +23 -0
- package/minilo/es/components/detail/index.vue.mjs +5 -0
- package/minilo/es/components/detail/index.vue2.mjs +194 -0
- package/minilo/es/components/detail/renderLabel.vue.d.ts +8 -0
- package/minilo/es/components/detail/renderLabel.vue.mjs +5 -0
- package/minilo/es/components/detail/renderLabel.vue2.mjs +23 -0
- package/minilo/es/components/detail/renderTooltip.vue.d.ts +8 -0
- package/minilo/es/components/detail/renderTooltip.vue.mjs +5 -0
- package/minilo/es/components/detail/renderTooltip.vue2.mjs +23 -0
- package/minilo/es/components/detail/type.d.ts +27 -0
- package/minilo/es/components/detail/type.mjs +1 -0
- package/minilo/es/components/index.d.ts +7 -0
- package/minilo/es/components/index.mjs +7 -0
- package/minilo/es/components/number-range-input/index.d.ts +41 -0
- package/minilo/es/components/number-range-input/index.mjs +6 -0
- package/minilo/es/components/number-range-input/index.vue.d.ts +33 -0
- package/minilo/es/components/number-range-input/index.vue.mjs +5 -0
- package/minilo/es/components/number-range-input/index.vue2.mjs +150 -0
- package/minilo/es/components/number-range-input/props.d.ts +10 -0
- package/minilo/es/components/number-range-input/props.mjs +1 -0
- package/minilo/es/components/search/index.d.ts +586 -0
- package/minilo/es/components/search/index.mjs +6 -0
- package/minilo/es/components/search/index.vue.d.ts +750 -0
- package/minilo/es/components/search/index.vue.mjs +5 -0
- package/minilo/es/components/search/index.vue2.mjs +298 -0
- package/minilo/es/components/search/props.d.ts +107 -0
- package/minilo/es/components/search/props.mjs +55 -0
- package/minilo/es/components/search-table/index.d.ts +274 -0
- package/minilo/es/components/search-table/index.mjs +6 -0
- package/minilo/es/components/search-table/index.vue.d.ts +173 -0
- package/minilo/es/components/search-table/index.vue.mjs +5 -0
- package/minilo/es/components/search-table/index.vue2.mjs +195 -0
- package/minilo/es/components/search-table/props.d.ts +69 -0
- package/minilo/es/components/search-table/props.mjs +69 -0
- package/minilo/es/components/search-table/render.d.ts +11 -0
- package/minilo/es/components/search-table/render.mjs +19 -0
- package/minilo/es/components/virtual-list/index.d.ts +59 -0
- package/minilo/es/components/virtual-list/index.mjs +6 -0
- package/minilo/es/components/virtual-list/index.vue.d.ts +39 -0
- package/minilo/es/components/virtual-list/index.vue.mjs +5 -0
- package/minilo/es/components/virtual-list/index.vue2.mjs +421 -0
- package/minilo/es/components/virtual-list/type.d.ts +20 -0
- package/minilo/es/components/virtual-list/type.mjs +1 -0
- package/minilo/es/index.d.ts +1087 -0
- 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
- 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
- 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
- package/minilo/es/packages/utils/dist/func/common.mjs +14 -0
- package/minilo/es/packages/utils/dist/request/index.mjs +110 -0
- package/minilo/es/resolver/index.d.ts +8 -0
- package/minilo/es/resolver/index.mjs +26 -0
- package/minilo/es/utils/index.d.ts +28 -0
- package/minilo/es/utils/index.mjs +30 -0
- package/minilo/lib/components/button/index.d.ts +47 -0
- package/minilo/lib/components/button/index.js +11 -0
- package/minilo/lib/components/button/index.vue.d.ts +29 -0
- package/minilo/lib/components/button/index.vue.js +9 -0
- package/minilo/lib/components/button/index.vue2.js +71 -0
- package/minilo/lib/components/button/type.d.ts +10 -0
- package/minilo/lib/components/button/type.js +2 -0
- package/minilo/lib/components/chart/index.d.ts +49 -0
- package/minilo/lib/components/chart/index.js +11 -0
- package/minilo/lib/components/chart/index.vue.d.ts +33 -0
- package/minilo/lib/components/chart/index.vue.js +9 -0
- package/minilo/lib/components/chart/index.vue2.js +128 -0
- package/minilo/lib/components/chart/type.d.ts +7 -0
- package/minilo/lib/components/chart/type.js +2 -0
- package/minilo/lib/components/detail/index.d.ts +37 -0
- package/minilo/lib/components/detail/index.js +11 -0
- package/minilo/lib/components/detail/index.vue.d.ts +23 -0
- package/minilo/lib/components/detail/index.vue.js +9 -0
- package/minilo/lib/components/detail/index.vue2.js +198 -0
- package/minilo/lib/components/detail/renderLabel.vue.d.ts +8 -0
- package/minilo/lib/components/detail/renderLabel.vue.js +9 -0
- package/minilo/lib/components/detail/renderLabel.vue2.js +27 -0
- package/minilo/lib/components/detail/renderTooltip.vue.d.ts +8 -0
- package/minilo/lib/components/detail/renderTooltip.vue.js +9 -0
- package/minilo/lib/components/detail/renderTooltip.vue2.js +27 -0
- package/minilo/lib/components/detail/type.d.ts +27 -0
- package/minilo/lib/components/detail/type.js +2 -0
- package/minilo/lib/components/index.d.ts +7 -0
- package/minilo/lib/components/index.js +19 -0
- package/minilo/lib/components/number-range-input/index.d.ts +41 -0
- package/minilo/lib/components/number-range-input/index.js +11 -0
- package/minilo/lib/components/number-range-input/index.vue.d.ts +33 -0
- package/minilo/lib/components/number-range-input/index.vue.js +9 -0
- package/minilo/lib/components/number-range-input/index.vue2.js +154 -0
- package/minilo/lib/components/number-range-input/props.d.ts +10 -0
- package/minilo/lib/components/number-range-input/props.js +2 -0
- package/minilo/lib/components/search/index.d.ts +586 -0
- package/minilo/lib/components/search/index.js +11 -0
- package/minilo/lib/components/search/index.vue.d.ts +750 -0
- package/minilo/lib/components/search/index.vue.js +9 -0
- package/minilo/lib/components/search/index.vue2.js +302 -0
- package/minilo/lib/components/search/props.d.ts +107 -0
- package/minilo/lib/components/search/props.js +58 -0
- package/minilo/lib/components/search-table/index.d.ts +274 -0
- package/minilo/lib/components/search-table/index.js +11 -0
- package/minilo/lib/components/search-table/index.vue.d.ts +173 -0
- package/minilo/lib/components/search-table/index.vue.js +9 -0
- package/minilo/lib/components/search-table/index.vue2.js +199 -0
- package/minilo/lib/components/search-table/props.d.ts +69 -0
- package/minilo/lib/components/search-table/props.js +72 -0
- package/minilo/lib/components/search-table/render.d.ts +11 -0
- package/minilo/lib/components/search-table/render.js +23 -0
- package/minilo/lib/components/virtual-list/index.d.ts +59 -0
- package/minilo/lib/components/virtual-list/index.js +11 -0
- package/minilo/lib/components/virtual-list/index.vue.d.ts +39 -0
- package/minilo/lib/components/virtual-list/index.vue.js +9 -0
- package/minilo/lib/components/virtual-list/index.vue2.js +425 -0
- package/minilo/lib/components/virtual-list/type.d.ts +20 -0
- package/minilo/lib/components/virtual-list/type.js +2 -0
- package/minilo/lib/index.d.ts +1087 -0
- 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
- 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
- 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
- package/minilo/lib/packages/utils/dist/func/common.js +16 -0
- package/minilo/lib/packages/utils/dist/request/index.js +120 -0
- package/minilo/lib/resolver/index.d.ts +8 -0
- package/minilo/lib/resolver/index.js +28 -0
- package/minilo/lib/utils/index.d.ts +28 -0
- package/minilo/lib/utils/index.js +34 -0
- package/minilo/theme-chalk/index.css +1 -0
- package/minilo/theme-chalk/ml-button.css +1 -0
- package/minilo/theme-chalk/ml-chart.css +1 -0
- package/minilo/theme-chalk/ml-detail.css +1 -0
- package/minilo/theme-chalk/ml-number-range-input.css +1 -0
- package/minilo/theme-chalk/ml-search-table.css +1 -0
- package/minilo/theme-chalk/ml-search.css +1 -0
- package/minilo/theme-chalk/ml-virtual-list.css +1 -0
- package/minilo/theme-chalk/src/button.scss +22 -0
- package/minilo/theme-chalk/src/chart.scss +11 -0
- package/minilo/theme-chalk/src/default/variable.scss +1 -0
- package/minilo/theme-chalk/src/detail.scss +9 -0
- package/minilo/theme-chalk/src/index.scss +12 -0
- package/minilo/theme-chalk/src/mixins/mixin.scss +273 -0
- package/minilo/theme-chalk/src/number-range-input.scss +9 -0
- package/minilo/theme-chalk/src/search-table.scss +47 -0
- package/minilo/theme-chalk/src/search.scss +20 -0
- package/minilo/theme-chalk/src/virtual-list.scss +49 -0
- 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,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,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 @@
|
|
|
1
|
+
|
|
@@ -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,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,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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|