@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,27 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+
5
+ var warning_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
6
+ name: "Warning",
7
+ __name: "warning",
8
+ setup(__props) {
9
+ return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ viewBox: "0 0 1024 1024"
12
+ }, [
13
+ vue.createElementVNode("path", {
14
+ fill: "currentColor",
15
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"
16
+ })
17
+ ]));
18
+ }
19
+ });
20
+ var warning_default = warning_vue_vue_type_script_setup_true_lang_default;
21
+ /*! Bundled license information:
22
+
23
+ @element-plus/icons-vue/dist/index.js:
24
+ (*! Element Plus Icons Vue v2.3.1 *)
25
+ */
26
+
27
+ exports.Warning = warning_default;
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ var index = require('../../../../@vueuse_shared@13.6.0_vue@3.5.17_typescript@5.9.3_/node_modules/@vueuse/shared/index.js');
4
+ var vue = require('vue');
5
+
6
+ const defaultWindow = index.isClient ? window : void 0;
7
+
8
+ function unrefElement(elRef) {
9
+ var _a;
10
+ const plain = vue.toValue(elRef);
11
+ return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
12
+ }
13
+
14
+ // @__NO_SIDE_EFFECTS__
15
+ function useMounted() {
16
+ const isMounted = vue.shallowRef(false);
17
+ const instance = vue.getCurrentInstance();
18
+ if (instance) {
19
+ vue.onMounted(() => {
20
+ isMounted.value = true;
21
+ }, instance);
22
+ }
23
+ return isMounted;
24
+ }
25
+
26
+ // @__NO_SIDE_EFFECTS__
27
+ function useSupported(callback) {
28
+ const isMounted = useMounted();
29
+ return vue.computed(() => {
30
+ isMounted.value;
31
+ return Boolean(callback());
32
+ });
33
+ }
34
+
35
+ function useResizeObserver(target, callback, options = {}) {
36
+ const { window = defaultWindow, ...observerOptions } = options;
37
+ let observer;
38
+ const isSupported = useSupported(() => window && "ResizeObserver" in window);
39
+ const cleanup = () => {
40
+ if (observer) {
41
+ observer.disconnect();
42
+ observer = void 0;
43
+ }
44
+ };
45
+ const targets = vue.computed(() => {
46
+ const _targets = vue.toValue(target);
47
+ return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
48
+ });
49
+ const stopWatch = vue.watch(
50
+ targets,
51
+ (els) => {
52
+ cleanup();
53
+ if (isSupported.value && window) {
54
+ observer = new ResizeObserver(callback);
55
+ for (const _el of els) {
56
+ if (_el)
57
+ observer.observe(_el, observerOptions);
58
+ }
59
+ }
60
+ },
61
+ { immediate: true, flush: "post" }
62
+ );
63
+ const stop = () => {
64
+ cleanup();
65
+ stopWatch();
66
+ };
67
+ index.tryOnScopeDispose(stop);
68
+ return {
69
+ isSupported,
70
+ stop
71
+ };
72
+ }
73
+
74
+ exports.createFilterWrapper = index.createFilterWrapper;
75
+ exports.debounceFilter = index.debounceFilter;
76
+ exports.isClient = index.isClient;
77
+ exports.noop = index.noop;
78
+ exports.tryOnScopeDispose = index.tryOnScopeDispose;
79
+ exports.useDebounceFn = index.useDebounceFn;
80
+ exports.defaultWindow = defaultWindow;
81
+ exports.unrefElement = unrefElement;
82
+ exports.useMounted = useMounted;
83
+ exports.useResizeObserver = useResizeObserver;
84
+ exports.useSupported = useSupported;
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+
5
+ function tryOnScopeDispose(fn) {
6
+ if (vue.getCurrentScope()) {
7
+ vue.onScopeDispose(fn);
8
+ return true;
9
+ }
10
+ return false;
11
+ }
12
+
13
+ const isClient = typeof window !== "undefined" && typeof document !== "undefined";
14
+ typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
15
+ const noop = () => {
16
+ };
17
+
18
+ function createFilterWrapper(filter, fn) {
19
+ function wrapper(...args) {
20
+ return new Promise((resolve, reject) => {
21
+ Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
22
+ });
23
+ }
24
+ return wrapper;
25
+ }
26
+ function debounceFilter(ms, options = {}) {
27
+ let timer;
28
+ let maxTimer;
29
+ let lastRejector = noop;
30
+ const _clearTimeout = (timer2) => {
31
+ clearTimeout(timer2);
32
+ lastRejector();
33
+ lastRejector = noop;
34
+ };
35
+ let lastInvoker;
36
+ const filter = (invoke) => {
37
+ const duration = vue.toValue(ms);
38
+ const maxDuration = vue.toValue(options.maxWait);
39
+ if (timer)
40
+ _clearTimeout(timer);
41
+ if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
42
+ if (maxTimer) {
43
+ _clearTimeout(maxTimer);
44
+ maxTimer = void 0;
45
+ }
46
+ return Promise.resolve(invoke());
47
+ }
48
+ return new Promise((resolve, reject) => {
49
+ lastRejector = options.rejectOnCancel ? reject : resolve;
50
+ lastInvoker = invoke;
51
+ if (maxDuration && !maxTimer) {
52
+ maxTimer = setTimeout(() => {
53
+ if (timer)
54
+ _clearTimeout(timer);
55
+ maxTimer = void 0;
56
+ resolve(lastInvoker());
57
+ }, maxDuration);
58
+ }
59
+ timer = setTimeout(() => {
60
+ if (maxTimer)
61
+ _clearTimeout(maxTimer);
62
+ maxTimer = void 0;
63
+ resolve(invoke());
64
+ }, duration);
65
+ });
66
+ };
67
+ return filter;
68
+ }
69
+
70
+ // @__NO_SIDE_EFFECTS__
71
+ function useDebounceFn(fn, ms = 200, options = {}) {
72
+ return createFilterWrapper(
73
+ debounceFilter(ms, options),
74
+ fn
75
+ );
76
+ }
77
+
78
+ exports.createFilterWrapper = createFilterWrapper;
79
+ exports.debounceFilter = debounceFilter;
80
+ exports.isClient = isClient;
81
+ exports.noop = noop;
82
+ exports.tryOnScopeDispose = tryOnScopeDispose;
83
+ exports.useDebounceFn = useDebounceFn;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ function getNestedValue(obj, path, defaultValue) {
4
+ if (typeof obj !== "object" || obj === null || !path) {
5
+ return defaultValue;
6
+ }
7
+ const keys = path.split(".").filter((key) => key !== "");
8
+ return keys.reduce((current, key) => {
9
+ if (typeof current !== "object" || current === null) {
10
+ return defaultValue;
11
+ }
12
+ return current[key] !== void 0 ? current[key] : defaultValue;
13
+ }, obj);
14
+ }
15
+
16
+ exports.getNestedValue = getNestedValue;
@@ -0,0 +1,120 @@
1
+ 'use strict';
2
+
3
+ var axios = require('axios');
4
+ var elementPlus = require('element-plus');
5
+ var defu = require('defu');
6
+
7
+ const initRequestInstance = (extendConfig = {}, interceptorsRequestFn = () => {
8
+ }, interceptorsResponseFn = () => {
9
+ }) => {
10
+ const axiosConfig = defu.defu({}, extendConfig, {
11
+ baseURL: "/",
12
+ // 从环境变量获取基础URL
13
+ timeout: 1e4,
14
+ // 超时时间
15
+ headers: {
16
+ "Content-Type": "application/json;charset=utf-8"
17
+ }
18
+ });
19
+ const instance = axios.create(axiosConfig);
20
+ instance.interceptors.request.use(
21
+ (config) => {
22
+ interceptorsRequestFn(config);
23
+ addPendingRequest(config);
24
+ return config;
25
+ },
26
+ (error) => {
27
+ return Promise.reject(error);
28
+ }
29
+ );
30
+ instance.interceptors.response.use(
31
+ (response) => {
32
+ interceptorsResponseFn(response);
33
+ removePendingRequest(response.config);
34
+ const data = response.data;
35
+ console.log(data);
36
+ if (data.code === 200) {
37
+ return Promise.resolve({
38
+ ...response,
39
+ ...data,
40
+ data: data.data
41
+ });
42
+ } else {
43
+ elementPlus.ElMessage.error(data.msg || "\u8BF7\u6C42\u5931\u8D25");
44
+ return Promise.reject(new Error(data.msg || "\u8BF7\u6C42\u5931\u8D25"));
45
+ }
46
+ },
47
+ (error) => {
48
+ console.log("\u8BF7\u6C42\u53D1\u751F\u9519\u8BEF>>>>>>>>>>>>>>>>>>\uFF1A", error);
49
+ if (error.config) {
50
+ removePendingRequest(error.config);
51
+ }
52
+ if (axios.isCancel(error)) {
53
+ console.warn("\u8BF7\u6C42\u5DF2\u88AB\u53D6\u6D88:", error.message);
54
+ return Promise.reject(new Error("\u8BF7\u6C42\u5DF2\u88AB\u53D6\u6D88"));
55
+ }
56
+ if (!window.navigator.onLine) {
57
+ elementPlus.ElMessage.error("\u7F51\u7EDC\u8FDE\u63A5\u5DF2\u65AD\u5F00\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC");
58
+ return Promise.reject(new Error("\u7F51\u7EDC\u8FDE\u63A5\u5DF2\u65AD\u5F00"));
59
+ }
60
+ const { response } = error;
61
+ if (response) {
62
+ switch (response.status) {
63
+ case 401:
64
+ elementPlus.ElMessage.error("\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55");
65
+ break;
66
+ case 403:
67
+ elementPlus.ElMessage.error("\u6CA1\u6709\u6743\u9650\u6267\u884C\u6B64\u64CD\u4F5C");
68
+ break;
69
+ case 404:
70
+ elementPlus.ElMessage.error("\u8BF7\u6C42\u7684\u8D44\u6E90\u4E0D\u5B58\u5728");
71
+ break;
72
+ case 500:
73
+ elementPlus.ElMessage.error("\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEF");
74
+ break;
75
+ default:
76
+ elementPlus.ElMessage.error(`\u8BF7\u6C42\u9519\u8BEF: ${response.status}`);
77
+ }
78
+ } else {
79
+ elementPlus.ElMessage.error("\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
80
+ }
81
+ return Promise.reject(error);
82
+ }
83
+ );
84
+ return instance;
85
+ };
86
+ const pendingRequests = /* @__PURE__ */ new Map();
87
+ const generateRequestKey = (config) => {
88
+ const { method, url, params, data } = config;
89
+ const paramsStr = params ? JSON.stringify(params) : "";
90
+ const dataStr = data ? JSON.stringify(data) : "";
91
+ return `${method}-${url}-${paramsStr}-${dataStr}`;
92
+ };
93
+ const addPendingRequest = (config) => {
94
+ const requestKey = generateRequestKey(config);
95
+ if (pendingRequests.has(requestKey)) {
96
+ const cancelToken = pendingRequests.get(requestKey);
97
+ cancelToken.cancel(`\u91CD\u590D\u8BF7\u6C42\u88AB\u53D6\u6D88: ${config.url}`);
98
+ pendingRequests.delete(requestKey);
99
+ }
100
+ const source = axios.CancelToken.source();
101
+ config.cancelToken = source.token;
102
+ pendingRequests.set(requestKey, source);
103
+ };
104
+ const removePendingRequest = (config) => {
105
+ const requestKey = generateRequestKey(config);
106
+ if (pendingRequests.has(requestKey)) {
107
+ pendingRequests.delete(requestKey);
108
+ }
109
+ };
110
+
111
+ exports.addPendingRequest = addPendingRequest;
112
+ exports.generateRequestKey = generateRequestKey;
113
+ exports.initRequestInstance = initRequestInstance;
114
+ exports.removePendingRequest = removePendingRequest;
115
+ Object.keys(axios).forEach(function (k) {
116
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
117
+ enumerable: true,
118
+ get: function () { return axios[k]; }
119
+ });
120
+ });
@@ -0,0 +1,8 @@
1
+ export declare const MiniloUiResolver: () => {
2
+ type: "component";
3
+ resolve: (name: string) => {
4
+ name: string;
5
+ from: string;
6
+ sideEffects: string;
7
+ } | null;
8
+ };
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ const libraryNamePrefixUpperCase = "Ml";
4
+ const libraryName = "minilo";
5
+ function kebabCase(key) {
6
+ const result = key.replace(/([A-Z])/g, " $1").trim();
7
+ return result.split(" ").join("-").toLowerCase();
8
+ }
9
+
10
+ const MiniloUiResolver = () => {
11
+ console.log("MiniloUiResolver\u521D\u59CB\u5316");
12
+ return {
13
+ type: "component",
14
+ resolve: (name) => {
15
+ if (name.startsWith(libraryNamePrefixUpperCase)) {
16
+ const componentName = kebabCase(name.slice(2));
17
+ return {
18
+ name,
19
+ from: `@${libraryName}/ui/es/${componentName}`,
20
+ sideEffects: `@${libraryName}/ui/theme-chalk/ml-${componentName}`
21
+ };
22
+ }
23
+ return null;
24
+ }
25
+ };
26
+ };
27
+
28
+ exports.MiniloUiResolver = MiniloUiResolver;
@@ -0,0 +1,28 @@
1
+ import { Component } from 'vue';
2
+ export declare const libraryNamePrefix = "ml";
3
+ export declare const libraryNamePrefixUpperCase = "Ml";
4
+ export declare const libraryName = "minilo";
5
+ /**
6
+ * @description 组件注册函数
7
+ * @author xieshuhong
8
+ * @template T
9
+ * @param {T} comp
10
+ * @return {*}
11
+ */
12
+ export declare const withInstall: <T extends Component>(comp: T) => T;
13
+ /**
14
+ * BEM命名规范工具函数
15
+ * @param {string} block - 必选,块名(如'button')
16
+ * @param {string|undefined} element - 可选,元素名(如'icon')
17
+ * @param {string|string[]|undefined} modifier - 可选,修饰符(如'primary'或['large', 'disabled'])
18
+ * @returns {string} 生成的class字符串
19
+ */
20
+ export declare function bem(block?: string, element?: string, modifier?: string): string;
21
+ /**
22
+ * @description 驼峰转 kabab
23
+ * @author xieshuhong
24
+ * @export
25
+ * @param {string} key
26
+ * @return {*}
27
+ */
28
+ export declare function kebabCase(key: string): string;
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ const libraryNamePrefix = "ml";
4
+ const withInstall = (comp) => {
5
+ comp.install = (app) => {
6
+ const compName = comp.name;
7
+ if (!compName) return;
8
+ app.component(compName, comp);
9
+ };
10
+ return comp;
11
+ };
12
+ function bem(block = "", element = "", modifier = "") {
13
+ if (!block || typeof block !== "string") {
14
+ console.error("BEM: block\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u4E14\u4E0D\u80FD\u4E3A\u7A7A");
15
+ return "";
16
+ }
17
+ let base = `${libraryNamePrefix}-${block}`;
18
+ if (element && typeof element === "string") {
19
+ base += `__${element}`;
20
+ }
21
+ if (!modifier) {
22
+ return base;
23
+ }
24
+ const modifiers = Array.isArray(modifier) ? modifier : [modifier];
25
+ const validModifiers = modifiers.filter((m) => typeof m === "string" && m.trim() !== "");
26
+ if (validModifiers.length === 0) {
27
+ return base;
28
+ }
29
+ return validModifiers.map((mod) => `${base}--${mod}`).join(" ");
30
+ }
31
+
32
+ exports.bem = bem;
33
+ exports.libraryNamePrefix = libraryNamePrefix;
34
+ exports.withInstall = withInstall;
@@ -0,0 +1 @@
1
+ .ml-search{width:100%}.ml-search__content{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap;gap:0;justify-content:space-between}.ml-search__content .el-form-item{margin-bottom:6px}.ml-search__content__left{flex:1}.ml-search__content__right{margin-left:12px}.ml-search__collapse{margin-bottom:10px}.ml-search-table{align-items:flex-start;display:flex;flex-direction:column;flex-wrap:nowrap;gap:0;height:100%;justify-content:flex-start}.ml-search-table :deep(.el-table){border-radius:8px 8px 0 0}.ml-search-table :deep(.el-table) th{background-color:#f3f3f3}.ml-search-table__content{flex:1;margin-top:10px;width:100%}.ml-search-table__pagination{width:100%}.ml-search-table__pagination,.ml-search-table__pagination .el-pagination{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;gap:0;justify-content:flex-end}.ml-chart{position:relative}.ml-chart,.ml-chart__container{height:100%;width:100%}.ml-detail .el-descriptions__body .el-descriptions__label:not(.is-bordered-label){margin-right:10px}.ml-button__tip{height:auto}.ml-button__tip:focus,.ml-button__tip:hover{animation:jump .3s}@keyframes jump{0%{transform:translateY(0)}50%{transform:translateY(-3px)}to{transform:translateY(0)}}.ml-virtual-list__container{border:1px solid #e4e7ed;border-radius:4px;overflow:auto;position:relative}.ml-virtual-list__container .loading-spinner{animation:spin .6s linear infinite;border:2px solid #e4e7ed;border-radius:50%;border-top-color:#409eff;display:inline-block;height:16px;margin-right:8px;width:16px}@keyframes spin{to{transform:rotate(1turn)}}.ml-virtual-list__finished-tip,.ml-virtual-list__loading-tip{align-items:center;background-color:#fff;color:#909399;display:flex;font-size:14px;justify-content:center;padding:20px}.ml-virtual-list__phantom{position:relative;width:100%}.ml-virtual-list__content{left:0;position:absolute;right:0;top:0}.ml-virtual-list__item{box-sizing:border-box}.ml-number-range-input{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:flex-start}.ml-number-range-input__separator{color:#666}
@@ -0,0 +1 @@
1
+ .ml-button__tip{height:auto}.ml-button__tip:focus,.ml-button__tip:hover{animation:jump .3s}@keyframes jump{0%{transform:translateY(0)}50%{transform:translateY(-3px)}to{transform:translateY(0)}}
@@ -0,0 +1 @@
1
+ .ml-chart{position:relative}.ml-chart,.ml-chart__container{height:100%;width:100%}
@@ -0,0 +1 @@
1
+ .ml-detail .el-descriptions__body .el-descriptions__label:not(.is-bordered-label){margin-right:10px}
@@ -0,0 +1 @@
1
+ .ml-number-range-input{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:flex-start}.ml-number-range-input__separator{color:#666}
@@ -0,0 +1 @@
1
+ .ml-search{width:100%}.ml-search__content{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap;gap:0;justify-content:space-between}.ml-search__content .el-form-item{margin-bottom:6px}.ml-search__content__left{flex:1}.ml-search__content__right{margin-left:12px}.ml-search__collapse{margin-bottom:10px}.ml-search-table{align-items:flex-start;display:flex;flex-direction:column;flex-wrap:nowrap;gap:0;height:100%;justify-content:flex-start}.ml-search-table :deep(.el-table){border-radius:8px 8px 0 0}.ml-search-table :deep(.el-table) th{background-color:#f3f3f3}.ml-search-table__content{flex:1;margin-top:10px;width:100%}.ml-search-table__pagination{width:100%}.ml-search-table__pagination,.ml-search-table__pagination .el-pagination{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;gap:0;justify-content:flex-end}
@@ -0,0 +1 @@
1
+ .ml-search{width:100%}.ml-search__content{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap;gap:0;justify-content:space-between}.ml-search__content .el-form-item{margin-bottom:6px}.ml-search__content__left{flex:1}.ml-search__content__right{margin-left:12px}.ml-search__collapse{margin-bottom:10px}
@@ -0,0 +1 @@
1
+ .ml-virtual-list__container{border:1px solid #e4e7ed;border-radius:4px;overflow:auto;position:relative}.ml-virtual-list__container .loading-spinner{animation:spin .6s linear infinite;border:2px solid #e4e7ed;border-radius:50%;border-top-color:#409eff;display:inline-block;height:16px;margin-right:8px;width:16px}@keyframes spin{to{transform:rotate(1turn)}}.ml-virtual-list__finished-tip,.ml-virtual-list__loading-tip{align-items:center;background-color:#fff;color:#909399;display:flex;font-size:14px;justify-content:center;padding:20px}.ml-virtual-list__phantom{position:relative;width:100%}.ml-virtual-list__content{left:0;position:absolute;right:0;top:0}.ml-virtual-list__item{box-sizing:border-box}
@@ -0,0 +1,22 @@
1
+ @use './mixins/mixin.scss' as *;
2
+
3
+ @include bem('button') {
4
+ &__tip {
5
+ height: auto;
6
+ &:hover,
7
+ &:focus {
8
+ animation: jump 0.3s;
9
+ }
10
+ @keyframes jump {
11
+ 0% {
12
+ transform: translateY(0);
13
+ }
14
+ 50% {
15
+ transform: translateY(-3px);
16
+ }
17
+ 100% {
18
+ transform: translateY(0);
19
+ }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,11 @@
1
+ @use './mixins/mixin.scss' as *;
2
+
3
+ @include bem('chart') {
4
+ width: 100%;
5
+ height: 100%;
6
+ position: relative;
7
+ &__container {
8
+ width: 100%;
9
+ height: 100%;
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ $library-prefix: 'ml-' !default;
@@ -0,0 +1,9 @@
1
+ @use './mixins/mixin.scss' as *;
2
+
3
+ @include bem('detail') {
4
+ .el-descriptions__body {
5
+ .el-descriptions__label:not(.is-bordered-label) {
6
+ margin-right: 10px;
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,12 @@
1
+ @forward './mixins/mixin.scss';
2
+ // 混合方法和全局样式
3
+ @use './mixins/mixin.scss' as *;
4
+ @use './default/variable.scss' as *;
5
+ // 组件样式
6
+ @use './search.scss';
7
+ @use './search-table.scss';
8
+ @use './chart.scss';
9
+ @use './detail.scss';
10
+ @use './button.scss';
11
+ @use './virtual-list.scss';
12
+ @use './number-range-input.scss';