@minilo/ui 0.0.7 → 0.0.8
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/package.json +2 -2
- package/minilo/dist/index.css +0 -1
- package/minilo/dist/index.full.js +0 -8393
- package/minilo/dist/index.full.min.js +0 -2
- package/minilo/dist/index.full.min.js.map +0 -1
- package/minilo/dist/index.full.min.mjs +0 -2
- package/minilo/dist/index.full.min.mjs.map +0 -1
- package/minilo/dist/index.full.mjs +0 -8373
- package/minilo/es/components/button/index.d.ts +0 -47
- package/minilo/es/components/button/index.mjs +0 -6
- package/minilo/es/components/button/index.vue.d.ts +0 -29
- package/minilo/es/components/button/index.vue.mjs +0 -5
- package/minilo/es/components/button/index.vue2.mjs +0 -67
- package/minilo/es/components/button/type.d.ts +0 -10
- package/minilo/es/components/chart/index.d.ts +0 -49
- package/minilo/es/components/chart/index.mjs +0 -6
- package/minilo/es/components/chart/index.vue.d.ts +0 -33
- package/minilo/es/components/chart/index.vue.mjs +0 -5
- package/minilo/es/components/chart/index.vue2.mjs +0 -124
- package/minilo/es/components/chart/type.d.ts +0 -7
- package/minilo/es/components/detail/index.d.ts +0 -37
- package/minilo/es/components/detail/index.mjs +0 -6
- package/minilo/es/components/detail/index.vue.d.ts +0 -23
- package/minilo/es/components/detail/index.vue.mjs +0 -5
- package/minilo/es/components/detail/index.vue2.mjs +0 -194
- package/minilo/es/components/detail/renderLabel.vue.d.ts +0 -8
- package/minilo/es/components/detail/renderLabel.vue.mjs +0 -5
- package/minilo/es/components/detail/renderLabel.vue2.mjs +0 -23
- package/minilo/es/components/detail/renderTooltip.vue.d.ts +0 -8
- package/minilo/es/components/detail/renderTooltip.vue.mjs +0 -5
- package/minilo/es/components/detail/renderTooltip.vue2.mjs +0 -23
- package/minilo/es/components/detail/type.d.ts +0 -27
- package/minilo/es/components/image-upload-pro/index.d.ts +0 -544
- package/minilo/es/components/image-upload-pro/index.mjs +0 -7
- package/minilo/es/components/image-upload-pro/index.vue.d.ts +0 -546
- package/minilo/es/components/image-upload-pro/index.vue.mjs +0 -5
- package/minilo/es/components/image-upload-pro/index.vue2.mjs +0 -657
- package/minilo/es/components/image-upload-pro/type.d.ts +0 -147
- package/minilo/es/components/image-upload-pro/type.mjs +0 -81
- package/minilo/es/components/index.d.ts +0 -11
- package/minilo/es/components/index.mjs +0 -14
- package/minilo/es/components/number-range-input/index.d.ts +0 -41
- package/minilo/es/components/number-range-input/index.mjs +0 -6
- package/minilo/es/components/number-range-input/index.vue.d.ts +0 -33
- package/minilo/es/components/number-range-input/index.vue.mjs +0 -5
- package/minilo/es/components/number-range-input/index.vue2.mjs +0 -150
- package/minilo/es/components/number-range-input/props.d.ts +0 -10
- package/minilo/es/components/search/index.d.ts +0 -488
- package/minilo/es/components/search/index.mjs +0 -6
- package/minilo/es/components/search/index.vue.d.ts +0 -554
- package/minilo/es/components/search/index.vue.mjs +0 -5
- package/minilo/es/components/search/index.vue2.mjs +0 -297
- package/minilo/es/components/search/props.d.ts +0 -107
- package/minilo/es/components/search/props.mjs +0 -55
- package/minilo/es/components/search-table/index.mjs +0 -6
- package/minilo/es/components/search-table/index.vue.d.ts +0 -189
- package/minilo/es/components/search-table/index.vue.mjs +0 -5
- package/minilo/es/components/search-table/index.vue2.mjs +0 -198
- package/minilo/es/components/search-table/props.d.ts +0 -69
- package/minilo/es/components/search-table/props.mjs +0 -69
- package/minilo/es/components/search-table/render.d.ts +0 -11
- package/minilo/es/components/search-table/render.mjs +0 -19
- package/minilo/es/components/tree-select/index.d.ts +0 -34
- package/minilo/es/components/tree-select/index.mjs +0 -6
- package/minilo/es/components/tree-select/index.vue.d.ts +0 -23
- package/minilo/es/components/tree-select/index.vue.mjs +0 -5
- package/minilo/es/components/tree-select/index.vue2.mjs +0 -229
- package/minilo/es/components/tree-select/type.d.ts +0 -34
- package/minilo/es/components/tree-select-dialog/index.d.ts +0 -64
- package/minilo/es/components/tree-select-dialog/index.mjs +0 -7
- package/minilo/es/components/tree-select-dialog/index.vue.d.ts +0 -26
- package/minilo/es/components/tree-select-dialog/index.vue.mjs +0 -5
- package/minilo/es/components/tree-select-dialog/index.vue2.mjs +0 -145
- package/minilo/es/components/tree-select-dialog/type.d.ts +0 -9
- package/minilo/es/components/tree-select-dialog/type.mjs +0 -24
- package/minilo/es/components/tree-select-drawer/index.d.ts +0 -69
- package/minilo/es/components/tree-select-drawer/index.mjs +0 -7
- package/minilo/es/components/tree-select-drawer/index.vue.d.ts +0 -26
- package/minilo/es/components/tree-select-drawer/index.vue.mjs +0 -5
- package/minilo/es/components/tree-select-drawer/index.vue2.mjs +0 -151
- package/minilo/es/components/tree-select-drawer/type.d.ts +0 -10
- package/minilo/es/components/tree-select-drawer/type.mjs +0 -20
- package/minilo/es/components/virtual-list/index.d.ts +0 -59
- package/minilo/es/components/virtual-list/index.mjs +0 -6
- package/minilo/es/components/virtual-list/index.vue.d.ts +0 -39
- package/minilo/es/components/virtual-list/index.vue.mjs +0 -5
- package/minilo/es/components/virtual-list/index.vue2.mjs +0 -423
- package/minilo/es/components/virtual-list/type.d.ts +0 -20
- package/minilo/es/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.26_typescript@5.9.3_/node_modules/@element-plus/icons-vue/dist/index.mjs +0 -41
- package/minilo/es/node_modules/.pnpm/@vueuse_core@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/index.mjs +0 -73
- package/minilo/es/node_modules/.pnpm/@vueuse_shared@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/index.mjs +0 -76
- package/minilo/es/packages/utils/dist/func/common.mjs +0 -14
- package/minilo/es/packages/utils/dist/request/index.mjs +0 -105
- package/minilo/es/resolver/index.d.ts +0 -8
- package/minilo/es/resolver/index.mjs +0 -26
- package/minilo/es/utils/index.d.ts +0 -28
- package/minilo/es/utils/index.mjs +0 -30
- package/minilo/lib/components/button/index.d.ts +0 -47
- package/minilo/lib/components/button/index.js +0 -11
- package/minilo/lib/components/button/index.vue.d.ts +0 -29
- package/minilo/lib/components/button/index.vue.js +0 -9
- package/minilo/lib/components/button/index.vue2.js +0 -71
- package/minilo/lib/components/button/type.d.ts +0 -10
- package/minilo/lib/components/chart/index.d.ts +0 -49
- package/minilo/lib/components/chart/index.js +0 -11
- package/minilo/lib/components/chart/index.vue.d.ts +0 -33
- package/minilo/lib/components/chart/index.vue.js +0 -9
- package/minilo/lib/components/chart/index.vue2.js +0 -128
- package/minilo/lib/components/chart/type.d.ts +0 -7
- package/minilo/lib/components/detail/index.d.ts +0 -37
- package/minilo/lib/components/detail/index.js +0 -11
- package/minilo/lib/components/detail/index.vue.d.ts +0 -23
- package/minilo/lib/components/detail/index.vue.js +0 -9
- package/minilo/lib/components/detail/index.vue2.js +0 -198
- package/minilo/lib/components/detail/renderLabel.vue.d.ts +0 -8
- package/minilo/lib/components/detail/renderLabel.vue.js +0 -9
- package/minilo/lib/components/detail/renderLabel.vue2.js +0 -27
- package/minilo/lib/components/detail/renderTooltip.vue.d.ts +0 -8
- package/minilo/lib/components/detail/renderTooltip.vue.js +0 -9
- package/minilo/lib/components/detail/renderTooltip.vue2.js +0 -27
- package/minilo/lib/components/detail/type.d.ts +0 -27
- package/minilo/lib/components/image-upload-pro/index.d.ts +0 -544
- package/minilo/lib/components/image-upload-pro/index.js +0 -13
- package/minilo/lib/components/image-upload-pro/index.vue.d.ts +0 -546
- package/minilo/lib/components/image-upload-pro/index.vue.js +0 -9
- package/minilo/lib/components/image-upload-pro/index.vue2.js +0 -661
- package/minilo/lib/components/image-upload-pro/type.d.ts +0 -147
- package/minilo/lib/components/image-upload-pro/type.js +0 -83
- package/minilo/lib/components/index.d.ts +0 -11
- package/minilo/lib/components/index.js +0 -33
- package/minilo/lib/components/number-range-input/index.d.ts +0 -41
- package/minilo/lib/components/number-range-input/index.js +0 -11
- package/minilo/lib/components/number-range-input/index.vue.d.ts +0 -33
- package/minilo/lib/components/number-range-input/index.vue.js +0 -9
- package/minilo/lib/components/number-range-input/index.vue2.js +0 -154
- package/minilo/lib/components/number-range-input/props.d.ts +0 -10
- package/minilo/lib/components/search/index.d.ts +0 -488
- package/minilo/lib/components/search/index.js +0 -11
- package/minilo/lib/components/search/index.vue.d.ts +0 -554
- package/minilo/lib/components/search/index.vue.js +0 -9
- package/minilo/lib/components/search/index.vue2.js +0 -301
- package/minilo/lib/components/search/props.d.ts +0 -107
- package/minilo/lib/components/search/props.js +0 -58
- package/minilo/lib/components/search-table/index.js +0 -11
- package/minilo/lib/components/search-table/index.vue.d.ts +0 -189
- package/minilo/lib/components/search-table/index.vue.js +0 -9
- package/minilo/lib/components/search-table/index.vue2.js +0 -202
- package/minilo/lib/components/search-table/props.d.ts +0 -69
- package/minilo/lib/components/search-table/props.js +0 -72
- package/minilo/lib/components/search-table/render.d.ts +0 -11
- package/minilo/lib/components/search-table/render.js +0 -23
- package/minilo/lib/components/tree-select/index.d.ts +0 -34
- package/minilo/lib/components/tree-select/index.js +0 -11
- package/minilo/lib/components/tree-select/index.vue.d.ts +0 -23
- package/minilo/lib/components/tree-select/index.vue.js +0 -9
- package/minilo/lib/components/tree-select/index.vue2.js +0 -233
- package/minilo/lib/components/tree-select/type.d.ts +0 -34
- package/minilo/lib/components/tree-select-dialog/index.d.ts +0 -64
- package/minilo/lib/components/tree-select-dialog/index.js +0 -13
- package/minilo/lib/components/tree-select-dialog/index.vue.d.ts +0 -26
- package/minilo/lib/components/tree-select-dialog/index.vue.js +0 -9
- package/minilo/lib/components/tree-select-dialog/index.vue2.js +0 -149
- package/minilo/lib/components/tree-select-dialog/type.d.ts +0 -9
- package/minilo/lib/components/tree-select-dialog/type.js +0 -26
- package/minilo/lib/components/tree-select-drawer/index.d.ts +0 -69
- package/minilo/lib/components/tree-select-drawer/index.js +0 -13
- package/minilo/lib/components/tree-select-drawer/index.vue.d.ts +0 -26
- package/minilo/lib/components/tree-select-drawer/index.vue.js +0 -9
- package/minilo/lib/components/tree-select-drawer/index.vue2.js +0 -155
- package/minilo/lib/components/tree-select-drawer/type.d.ts +0 -10
- package/minilo/lib/components/tree-select-drawer/type.js +0 -22
- package/minilo/lib/components/virtual-list/index.d.ts +0 -59
- package/minilo/lib/components/virtual-list/index.js +0 -11
- package/minilo/lib/components/virtual-list/index.vue.d.ts +0 -39
- package/minilo/lib/components/virtual-list/index.vue.js +0 -9
- package/minilo/lib/components/virtual-list/index.vue2.js +0 -427
- package/minilo/lib/components/virtual-list/type.d.ts +0 -20
- package/minilo/lib/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.26_typescript@5.9.3_/node_modules/@element-plus/icons-vue/dist/index.js +0 -44
- package/minilo/lib/node_modules/.pnpm/@vueuse_core@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/index.js +0 -84
- package/minilo/lib/node_modules/.pnpm/@vueuse_shared@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/index.js +0 -83
- package/minilo/lib/packages/utils/dist/func/common.js +0 -16
- package/minilo/lib/packages/utils/dist/request/index.js +0 -115
- package/minilo/lib/resolver/index.d.ts +0 -8
- package/minilo/lib/resolver/index.js +0 -28
- package/minilo/lib/utils/index.d.ts +0 -28
- package/minilo/lib/utils/index.js +0 -34
- package/minilo/theme-chalk/index.css +0 -1
- package/minilo/theme-chalk/ml-button.css +0 -1
- package/minilo/theme-chalk/ml-chart.css +0 -1
- package/minilo/theme-chalk/ml-detail.css +0 -1
- package/minilo/theme-chalk/ml-image-upload-pro.css +0 -1
- package/minilo/theme-chalk/ml-number-range-input.css +0 -1
- package/minilo/theme-chalk/ml-search-table.css +0 -1
- package/minilo/theme-chalk/ml-search.css +0 -1
- package/minilo/theme-chalk/ml-tree-select-dialog.css +0 -0
- package/minilo/theme-chalk/ml-tree-select-drawer.css +0 -0
- package/minilo/theme-chalk/ml-tree-select.css +0 -1
- package/minilo/theme-chalk/ml-virtual-list.css +0 -1
- package/minilo/theme-chalk/src/button.scss +0 -22
- package/minilo/theme-chalk/src/chart.scss +0 -11
- package/minilo/theme-chalk/src/default/variable.scss +0 -1
- package/minilo/theme-chalk/src/detail.scss +0 -9
- package/minilo/theme-chalk/src/image-upload-pro.scss +0 -70
- package/minilo/theme-chalk/src/index.scss +0 -14
- package/minilo/theme-chalk/src/mixins/mixin.scss +0 -273
- package/minilo/theme-chalk/src/number-range-input.scss +0 -9
- package/minilo/theme-chalk/src/search-table.scss +0 -47
- package/minilo/theme-chalk/src/search.scss +0 -20
- package/minilo/theme-chalk/src/tree-select-dialog.scss +0 -0
- package/minilo/theme-chalk/src/tree-select-drawer.scss +0 -0
- package/minilo/theme-chalk/src/tree-select.scss +0 -47
- package/minilo/theme-chalk/src/virtual-list.scss +0 -49
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { getCurrentScope, onScopeDispose, toValue } from 'vue';
|
|
2
|
-
|
|
3
|
-
function tryOnScopeDispose(fn) {
|
|
4
|
-
if (getCurrentScope()) {
|
|
5
|
-
onScopeDispose(fn);
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
12
|
-
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
13
|
-
const noop = () => {
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
function createFilterWrapper(filter, fn) {
|
|
17
|
-
function wrapper(...args) {
|
|
18
|
-
return new Promise((resolve, reject) => {
|
|
19
|
-
Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return wrapper;
|
|
23
|
-
}
|
|
24
|
-
function debounceFilter(ms, options = {}) {
|
|
25
|
-
let timer;
|
|
26
|
-
let maxTimer;
|
|
27
|
-
let lastRejector = noop;
|
|
28
|
-
const _clearTimeout = (timer2) => {
|
|
29
|
-
clearTimeout(timer2);
|
|
30
|
-
lastRejector();
|
|
31
|
-
lastRejector = noop;
|
|
32
|
-
};
|
|
33
|
-
let lastInvoker;
|
|
34
|
-
const filter = (invoke) => {
|
|
35
|
-
const duration = toValue(ms);
|
|
36
|
-
const maxDuration = toValue(options.maxWait);
|
|
37
|
-
if (timer)
|
|
38
|
-
_clearTimeout(timer);
|
|
39
|
-
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
40
|
-
if (maxTimer) {
|
|
41
|
-
_clearTimeout(maxTimer);
|
|
42
|
-
maxTimer = void 0;
|
|
43
|
-
}
|
|
44
|
-
return Promise.resolve(invoke());
|
|
45
|
-
}
|
|
46
|
-
return new Promise((resolve, reject) => {
|
|
47
|
-
lastRejector = options.rejectOnCancel ? reject : resolve;
|
|
48
|
-
lastInvoker = invoke;
|
|
49
|
-
if (maxDuration && !maxTimer) {
|
|
50
|
-
maxTimer = setTimeout(() => {
|
|
51
|
-
if (timer)
|
|
52
|
-
_clearTimeout(timer);
|
|
53
|
-
maxTimer = void 0;
|
|
54
|
-
resolve(lastInvoker());
|
|
55
|
-
}, maxDuration);
|
|
56
|
-
}
|
|
57
|
-
timer = setTimeout(() => {
|
|
58
|
-
if (maxTimer)
|
|
59
|
-
_clearTimeout(maxTimer);
|
|
60
|
-
maxTimer = void 0;
|
|
61
|
-
resolve(invoke());
|
|
62
|
-
}, duration);
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
return filter;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// @__NO_SIDE_EFFECTS__
|
|
69
|
-
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
70
|
-
return createFilterWrapper(
|
|
71
|
-
debounceFilter(ms, options),
|
|
72
|
-
fn
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export { createFilterWrapper, debounceFilter, isClient, noop, tryOnScopeDispose, useDebounceFn };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
function getNestedValue(obj, path, defaultValue) {
|
|
2
|
-
if (typeof obj !== "object" || obj === null || !path) {
|
|
3
|
-
return defaultValue;
|
|
4
|
-
}
|
|
5
|
-
const keys = path.split(".").filter((key) => key !== "");
|
|
6
|
-
return keys.reduce((current, key) => {
|
|
7
|
-
if (typeof current !== "object" || current === null) {
|
|
8
|
-
return defaultValue;
|
|
9
|
-
}
|
|
10
|
-
return current[key] !== void 0 ? current[key] : defaultValue;
|
|
11
|
-
}, obj);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { getNestedValue };
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import axios$1 from 'axios';
|
|
2
|
-
export * from 'axios';
|
|
3
|
-
import { ElMessage } from 'element-plus';
|
|
4
|
-
import { defu } from 'defu';
|
|
5
|
-
|
|
6
|
-
const initRequestInstance = (extendConfig = {}, options = {}) => {
|
|
7
|
-
const { interceptorsRequestFn = () => {
|
|
8
|
-
}, interceptorsResponseFn = () => {
|
|
9
|
-
}, isSuccess = (data) => data?.code === 200, getData = (data) => data?.data, getMessage = (data) => data?.msg || "\u8BF7\u6C42\u5931\u8D25" } = options;
|
|
10
|
-
const axiosConfig = 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$1.create(axiosConfig);
|
|
20
|
-
instance.interceptors.request.use((config) => {
|
|
21
|
-
interceptorsRequestFn(config);
|
|
22
|
-
addPendingRequest(config);
|
|
23
|
-
return config;
|
|
24
|
-
}, (error) => {
|
|
25
|
-
return Promise.reject(error);
|
|
26
|
-
});
|
|
27
|
-
instance.interceptors.response.use((response) => {
|
|
28
|
-
interceptorsResponseFn(response);
|
|
29
|
-
removePendingRequest(response.config);
|
|
30
|
-
const data = response.data;
|
|
31
|
-
if (isSuccess(data)) {
|
|
32
|
-
return Promise.resolve({
|
|
33
|
-
...response,
|
|
34
|
-
...data,
|
|
35
|
-
data: getData(data)
|
|
36
|
-
});
|
|
37
|
-
} else {
|
|
38
|
-
const msg = getMessage(data);
|
|
39
|
-
ElMessage.error(msg);
|
|
40
|
-
return Promise.reject(new Error(msg));
|
|
41
|
-
}
|
|
42
|
-
}, (error) => {
|
|
43
|
-
console.log("\u8BF7\u6C42\u53D1\u751F\u9519\u8BEF>>>>>>>>>>>>>>>>>>\uFF1A", error);
|
|
44
|
-
if (error.config) {
|
|
45
|
-
removePendingRequest(error.config);
|
|
46
|
-
}
|
|
47
|
-
if (axios$1.isCancel(error)) {
|
|
48
|
-
console.warn("\u8BF7\u6C42\u5DF2\u88AB\u53D6\u6D88:", error.message);
|
|
49
|
-
return Promise.reject(new Error("\u8BF7\u6C42\u5DF2\u88AB\u53D6\u6D88"));
|
|
50
|
-
}
|
|
51
|
-
if (!window.navigator.onLine) {
|
|
52
|
-
ElMessage.error("\u7F51\u7EDC\u8FDE\u63A5\u5DF2\u65AD\u5F00\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC");
|
|
53
|
-
return Promise.reject(new Error("\u7F51\u7EDC\u8FDE\u63A5\u5DF2\u65AD\u5F00"));
|
|
54
|
-
}
|
|
55
|
-
const { response } = error;
|
|
56
|
-
if (response) {
|
|
57
|
-
switch (response.status) {
|
|
58
|
-
case 401:
|
|
59
|
-
ElMessage.error("\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55");
|
|
60
|
-
break;
|
|
61
|
-
case 403:
|
|
62
|
-
ElMessage.error("\u6CA1\u6709\u6743\u9650\u6267\u884C\u6B64\u64CD\u4F5C");
|
|
63
|
-
break;
|
|
64
|
-
case 404:
|
|
65
|
-
ElMessage.error("\u8BF7\u6C42\u7684\u8D44\u6E90\u4E0D\u5B58\u5728");
|
|
66
|
-
break;
|
|
67
|
-
case 500:
|
|
68
|
-
ElMessage.error("\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEF");
|
|
69
|
-
break;
|
|
70
|
-
default:
|
|
71
|
-
ElMessage.error(`\u8BF7\u6C42\u9519\u8BEF: ${response.status}`);
|
|
72
|
-
}
|
|
73
|
-
} else {
|
|
74
|
-
ElMessage.error("\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
75
|
-
}
|
|
76
|
-
return Promise.reject(error);
|
|
77
|
-
});
|
|
78
|
-
return instance;
|
|
79
|
-
};
|
|
80
|
-
const pendingRequests = /* @__PURE__ */ new Map();
|
|
81
|
-
const generateRequestKey = (config) => {
|
|
82
|
-
const { method, url, params, data } = config;
|
|
83
|
-
const paramsStr = params ? JSON.stringify(params) : "";
|
|
84
|
-
const dataStr = data ? JSON.stringify(data) : "";
|
|
85
|
-
return `${method}-${url}-${paramsStr}-${dataStr}`;
|
|
86
|
-
};
|
|
87
|
-
const addPendingRequest = (config) => {
|
|
88
|
-
const requestKey = generateRequestKey(config);
|
|
89
|
-
if (pendingRequests.has(requestKey)) {
|
|
90
|
-
const cancelToken = pendingRequests.get(requestKey);
|
|
91
|
-
cancelToken.cancel(`\u91CD\u590D\u8BF7\u6C42\u88AB\u53D6\u6D88: ${config.url}`);
|
|
92
|
-
pendingRequests.delete(requestKey);
|
|
93
|
-
}
|
|
94
|
-
const source = axios$1.CancelToken.source();
|
|
95
|
-
config.cancelToken = source.token;
|
|
96
|
-
pendingRequests.set(requestKey, source);
|
|
97
|
-
};
|
|
98
|
-
const removePendingRequest = (config) => {
|
|
99
|
-
const requestKey = generateRequestKey(config);
|
|
100
|
-
if (pendingRequests.has(requestKey)) {
|
|
101
|
-
pendingRequests.delete(requestKey);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export { addPendingRequest, generateRequestKey, initRequestInstance, removePendingRequest };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const libraryNamePrefixUpperCase = "Ml";
|
|
2
|
-
const libraryName = "minilo";
|
|
3
|
-
function kebabCase(key) {
|
|
4
|
-
const result = key.replace(/([A-Z])/g, " $1").trim();
|
|
5
|
-
return result.split(" ").join("-").toLowerCase();
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const MiniloUiResolver = () => {
|
|
9
|
-
console.log("MiniloUiResolver\u521D\u59CB\u5316");
|
|
10
|
-
return {
|
|
11
|
-
type: "component",
|
|
12
|
-
resolve: (name) => {
|
|
13
|
-
if (name.startsWith(libraryNamePrefixUpperCase)) {
|
|
14
|
-
const componentName = kebabCase(name.slice(2));
|
|
15
|
-
return {
|
|
16
|
-
name,
|
|
17
|
-
from: `@${libraryName}/ui/es/${componentName}`,
|
|
18
|
-
sideEffects: [`@${libraryName}/ui/theme-chalk/ml-${componentName}`]
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export { MiniloUiResolver };
|
|
@@ -1,28 +0,0 @@
|
|
|
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;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const libraryNamePrefix = "ml";
|
|
2
|
-
const withInstall = (comp) => {
|
|
3
|
-
comp.install = (app) => {
|
|
4
|
-
const compName = comp.name;
|
|
5
|
-
if (!compName) return;
|
|
6
|
-
app.component(compName, comp);
|
|
7
|
-
};
|
|
8
|
-
return comp;
|
|
9
|
-
};
|
|
10
|
-
function bem(block = "", element = "", modifier = "") {
|
|
11
|
-
if (!block || typeof block !== "string") {
|
|
12
|
-
console.error("BEM: block\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u4E14\u4E0D\u80FD\u4E3A\u7A7A");
|
|
13
|
-
return "";
|
|
14
|
-
}
|
|
15
|
-
let base = `${libraryNamePrefix}-${block}`;
|
|
16
|
-
if (element && typeof element === "string") {
|
|
17
|
-
base += `__${element}`;
|
|
18
|
-
}
|
|
19
|
-
if (!modifier) {
|
|
20
|
-
return base;
|
|
21
|
-
}
|
|
22
|
-
const modifiers = Array.isArray(modifier) ? modifier : [modifier];
|
|
23
|
-
const validModifiers = modifiers.filter((m) => typeof m === "string" && m.trim() !== "");
|
|
24
|
-
if (validModifiers.length === 0) {
|
|
25
|
-
return base;
|
|
26
|
-
}
|
|
27
|
-
return validModifiers.map((mod) => `${base}--${mod}`).join(" ");
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { bem, libraryNamePrefix, withInstall };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export declare const MlButton: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').MlButtonSelfProps> & Readonly<{
|
|
3
|
-
onClick?: (...args: any[]) => any;
|
|
4
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
-
click: (...args: any[]) => void;
|
|
6
|
-
}, import('vue').PublicProps, {
|
|
7
|
-
time: number;
|
|
8
|
-
placement: string;
|
|
9
|
-
tip: string;
|
|
10
|
-
tipProps: Record<string, any>;
|
|
11
|
-
isDebounce: boolean;
|
|
12
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
13
|
-
P: {};
|
|
14
|
-
B: {};
|
|
15
|
-
D: {};
|
|
16
|
-
C: {};
|
|
17
|
-
M: {};
|
|
18
|
-
Defaults: {};
|
|
19
|
-
}, Readonly<import('./type').MlButtonSelfProps> & Readonly<{
|
|
20
|
-
onClick?: (...args: any[]) => any;
|
|
21
|
-
}>, {}, {}, {}, {}, {
|
|
22
|
-
time: number;
|
|
23
|
-
placement: string;
|
|
24
|
-
tip: string;
|
|
25
|
-
tipProps: Record<string, any>;
|
|
26
|
-
isDebounce: boolean;
|
|
27
|
-
}>;
|
|
28
|
-
__isFragment?: never;
|
|
29
|
-
__isTeleport?: never;
|
|
30
|
-
__isSuspense?: never;
|
|
31
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./type').MlButtonSelfProps> & Readonly<{
|
|
32
|
-
onClick?: (...args: any[]) => any;
|
|
33
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
-
click: (...args: any[]) => void;
|
|
35
|
-
}, string, {
|
|
36
|
-
time: number;
|
|
37
|
-
placement: string;
|
|
38
|
-
tip: string;
|
|
39
|
-
tipProps: Record<string, any>;
|
|
40
|
-
isDebounce: boolean;
|
|
41
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
42
|
-
$slots: {
|
|
43
|
-
default?(_: {}): any;
|
|
44
|
-
default?(_: {}): any;
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
export default MlButton;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var index = require('../../utils/index.js');
|
|
6
|
-
var index_vue_vue_type_script_setup_true_lang = require('./index.vue2.js');
|
|
7
|
-
|
|
8
|
-
const MlButton = index.withInstall(index_vue_vue_type_script_setup_true_lang.default);
|
|
9
|
-
|
|
10
|
-
exports.MlButton = MlButton;
|
|
11
|
-
exports.default = MlButton;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { MlButtonSelfProps as MlButtonProps } from './type';
|
|
2
|
-
declare function __VLS_template(): {
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
default?(_: {}): any;
|
|
6
|
-
default?(_: {}): any;
|
|
7
|
-
};
|
|
8
|
-
refs: {};
|
|
9
|
-
rootEl: any;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: import('vue').DefineComponent<MlButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
-
click: (...args: any[]) => void;
|
|
14
|
-
}, string, import('vue').PublicProps, Readonly<MlButtonProps> & Readonly<{
|
|
15
|
-
onClick?: (...args: any[]) => any;
|
|
16
|
-
}>, {
|
|
17
|
-
time: number;
|
|
18
|
-
placement: string;
|
|
19
|
-
tip: string;
|
|
20
|
-
tipProps: Record<string, any>;
|
|
21
|
-
isDebounce: boolean;
|
|
22
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
-
export default _default;
|
|
25
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
-
new (): {
|
|
27
|
-
$slots: S;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var index = require('../../utils/index.js');
|
|
7
|
-
var elementPlus = require('element-plus');
|
|
8
|
-
|
|
9
|
-
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10
|
-
...{
|
|
11
|
-
name: "MlButton"
|
|
12
|
-
},
|
|
13
|
-
__name: "index",
|
|
14
|
-
props: {
|
|
15
|
-
time: { type: Number, required: false, default: 1e3 },
|
|
16
|
-
tip: { type: String, required: false, default: "" },
|
|
17
|
-
placement: { type: String, required: false, default: "top" },
|
|
18
|
-
tipProps: { type: Object, required: false, default: () => ({}) },
|
|
19
|
-
isDebounce: { type: Boolean, required: false, default: true }
|
|
20
|
-
},
|
|
21
|
-
emits: ["click"],
|
|
22
|
-
setup(__props, { emit: __emit }) {
|
|
23
|
-
const props = __props;
|
|
24
|
-
const emits = __emit;
|
|
25
|
-
const record = vue.ref(0);
|
|
26
|
-
const handleClick = () => {
|
|
27
|
-
if (!props.isDebounce) return emits("click");
|
|
28
|
-
const newTime = /* @__PURE__ */ new Date();
|
|
29
|
-
if (newTime.getTime() - record.value > props.time) {
|
|
30
|
-
emits("click");
|
|
31
|
-
}
|
|
32
|
-
record.value = newTime.getTime();
|
|
33
|
-
};
|
|
34
|
-
return (_ctx, _cache) => {
|
|
35
|
-
return __props.tip ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), vue.mergeProps({
|
|
36
|
-
key: 0,
|
|
37
|
-
content: __props.tip,
|
|
38
|
-
placement: __props.placement
|
|
39
|
-
}, __props.tipProps), {
|
|
40
|
-
default: vue.withCtx(() => [
|
|
41
|
-
vue.createVNode(vue.unref(elementPlus.ElButton), vue.mergeProps(_ctx.$attrs, {
|
|
42
|
-
class: vue.unref(index.bem)("button", "tip"),
|
|
43
|
-
onClick: handleClick
|
|
44
|
-
}), {
|
|
45
|
-
default: vue.withCtx(() => [
|
|
46
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
47
|
-
]),
|
|
48
|
-
_: 3
|
|
49
|
-
/* FORWARDED */
|
|
50
|
-
}, 16, ["class"])
|
|
51
|
-
]),
|
|
52
|
-
_: 3
|
|
53
|
-
/* FORWARDED */
|
|
54
|
-
}, 16, ["content", "placement"])) : (vue.openBlock(), vue.createBlock(
|
|
55
|
-
vue.unref(elementPlus.ElButton),
|
|
56
|
-
vue.mergeProps({ key: 1 }, _ctx.$attrs, { onClick: handleClick }),
|
|
57
|
-
{
|
|
58
|
-
default: vue.withCtx(() => [
|
|
59
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
60
|
-
]),
|
|
61
|
-
_: 3
|
|
62
|
-
/* FORWARDED */
|
|
63
|
-
},
|
|
64
|
-
16
|
|
65
|
-
/* FULL_PROPS */
|
|
66
|
-
));
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
exports.default = _sfc_main;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from 'element-plus';
|
|
2
|
-
import { Mutable } from 'element-plus/es/utils';
|
|
3
|
-
export interface MlButtonSelfProps {
|
|
4
|
-
time?: number;
|
|
5
|
-
tip?: string;
|
|
6
|
-
placement?: string;
|
|
7
|
-
tipProps?: Record<string, any>;
|
|
8
|
-
isDebounce?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export type MlButtonProps = MlButtonSelfProps & Partial<Mutable<ButtonProps>>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
export declare const MlChart: {
|
|
2
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').MlChartProps> & Readonly<{
|
|
3
|
-
[x: `on${Capitalize<string>}`]: (...args: unknown[] & []) => any;
|
|
4
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
-
[x: string]: ((...args: unknown[]) => any) | (() => any);
|
|
6
|
-
}, import('vue').PublicProps, {
|
|
7
|
-
options: Record<string, any>;
|
|
8
|
-
id: string;
|
|
9
|
-
theme: string;
|
|
10
|
-
isEmpty: boolean | ((options: Record<string, any>) => boolean);
|
|
11
|
-
description: string;
|
|
12
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
13
|
-
echartRef: HTMLDivElement;
|
|
14
|
-
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
15
|
-
P: {};
|
|
16
|
-
B: {};
|
|
17
|
-
D: {};
|
|
18
|
-
C: {};
|
|
19
|
-
M: {};
|
|
20
|
-
Defaults: {};
|
|
21
|
-
}, Readonly<import('./type').MlChartProps> & Readonly<{
|
|
22
|
-
[x: `on${Capitalize<string>}`]: (...args: unknown[] & []) => any;
|
|
23
|
-
}>, {}, {}, {}, {}, {
|
|
24
|
-
options: Record<string, any>;
|
|
25
|
-
id: string;
|
|
26
|
-
theme: string;
|
|
27
|
-
isEmpty: boolean | ((options: Record<string, any>) => boolean);
|
|
28
|
-
description: string;
|
|
29
|
-
}>;
|
|
30
|
-
__isFragment?: never;
|
|
31
|
-
__isTeleport?: never;
|
|
32
|
-
__isSuspense?: never;
|
|
33
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./type').MlChartProps> & Readonly<{
|
|
34
|
-
[x: `on${Capitalize<string>}`]: (...args: unknown[] & []) => any;
|
|
35
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
|
-
[x: string]: ((...args: unknown[]) => any) | (() => any);
|
|
37
|
-
}, string, {
|
|
38
|
-
options: Record<string, any>;
|
|
39
|
-
id: string;
|
|
40
|
-
theme: string;
|
|
41
|
-
isEmpty: boolean | ((options: Record<string, any>) => boolean);
|
|
42
|
-
description: string;
|
|
43
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
44
|
-
$slots: {
|
|
45
|
-
empty?(_: {}): any;
|
|
46
|
-
default?(_: {}): any;
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
export default MlChart;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var index = require('../../utils/index.js');
|
|
6
|
-
var index_vue_vue_type_script_setup_true_lang = require('./index.vue2.js');
|
|
7
|
-
|
|
8
|
-
const MlChart = index.withInstall(index_vue_vue_type_script_setup_true_lang.default);
|
|
9
|
-
|
|
10
|
-
exports.MlChart = MlChart;
|
|
11
|
-
exports.default = MlChart;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { MlChartProps } from './type';
|
|
2
|
-
declare function __VLS_template(): {
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
empty?(_: {}): any;
|
|
6
|
-
default?(_: {}): any;
|
|
7
|
-
};
|
|
8
|
-
refs: {
|
|
9
|
-
echartRef: HTMLDivElement;
|
|
10
|
-
};
|
|
11
|
-
rootEl: HTMLDivElement;
|
|
12
|
-
};
|
|
13
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: import('vue').DefineComponent<MlChartProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
-
[x: string]: ((...args: unknown[]) => any) | (() => any);
|
|
16
|
-
}, string, import('vue').PublicProps, Readonly<MlChartProps> & Readonly<{
|
|
17
|
-
[x: `on${Capitalize<string>}`]: (...args: unknown[] & []) => any;
|
|
18
|
-
}>, {
|
|
19
|
-
options: Record<string, any>;
|
|
20
|
-
id: string;
|
|
21
|
-
theme: string;
|
|
22
|
-
isEmpty: boolean | ((options: Record<string, any>) => boolean);
|
|
23
|
-
description: string;
|
|
24
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
25
|
-
echartRef: HTMLDivElement;
|
|
26
|
-
}, 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
|
-
};
|