ebuilds-shared 0.1.0
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 +69 -0
- package/dist/chunk-6DZX6EAA.mjs +37 -0
- package/dist/chunk-G4JQ2UQV.mjs +2878 -0
- package/dist/chunk-LATZ6U6A.js +2878 -0
- package/dist/chunk-MXO66M74.js +36 -0
- package/dist/chunk-OW2EL2VY.mjs +36 -0
- package/dist/chunk-QGM4M3NI.js +37 -0
- package/dist/chunk-QQPGJGSU.js +6916 -0
- package/dist/chunk-RRULL645.mjs +6916 -0
- package/dist/functionalComponent/index.d.mts +16 -0
- package/dist/functionalComponent/index.d.ts +16 -0
- package/dist/functionalComponent/index.js +25 -0
- package/dist/functionalComponent/index.mjs +25 -0
- package/dist/index-CVmrbYyU.d.mts +34 -0
- package/dist/index-CVmrbYyU.d.ts +34 -0
- package/dist/index.css +69 -0
- package/dist/index.d.mts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +65 -0
- package/dist/index.mjs +65 -0
- package/dist/stores/index.d.mts +294 -0
- package/dist/stores/index.d.ts +294 -0
- package/dist/stores/index.js +13 -0
- package/dist/stores/index.mjs +13 -0
- package/dist/styles/index.css +69 -0
- package/dist/styles/index.d.mts +2 -0
- package/dist/styles/index.d.ts +2 -0
- package/dist/uno-config/index.d.mts +8 -0
- package/dist/uno-config/index.d.ts +8 -0
- package/dist/uno-config/index.js +9 -0
- package/dist/uno-config/index.mjs +9 -0
- package/dist/utils/index.d.mts +157 -0
- package/dist/utils/index.d.ts +157 -0
- package/dist/utils/index.js +49 -0
- package/dist/utils/index.mjs +49 -0
- package/dist/vite-config/index.d.mts +31 -0
- package/dist/vite-config/index.d.ts +31 -0
- package/dist/vite-config/index.js +7 -0
- package/dist/vite-config/index.mjs +7 -0
- package/package.json +79 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare function createEbMessage({ title, message, // 消息
|
|
2
|
+
type, // 类型
|
|
3
|
+
duration, // 消息停留时间
|
|
4
|
+
offset, // 偏移量
|
|
5
|
+
showClose, // 是否显示关闭按钮
|
|
6
|
+
dangerouslyUseHTMLString }: {
|
|
7
|
+
title?: string;
|
|
8
|
+
message: string;
|
|
9
|
+
type: 'success' | 'warning' | 'error' | 'info';
|
|
10
|
+
duration?: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
showClose?: boolean;
|
|
13
|
+
dangerouslyUseHTMLString?: boolean;
|
|
14
|
+
}): void;
|
|
15
|
+
|
|
16
|
+
export { createEbMessage };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare function createEbMessage({ title, message, // 消息
|
|
2
|
+
type, // 类型
|
|
3
|
+
duration, // 消息停留时间
|
|
4
|
+
offset, // 偏移量
|
|
5
|
+
showClose, // 是否显示关闭按钮
|
|
6
|
+
dangerouslyUseHTMLString }: {
|
|
7
|
+
title?: string;
|
|
8
|
+
message: string;
|
|
9
|
+
type: 'success' | 'warning' | 'error' | 'info';
|
|
10
|
+
duration?: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
showClose?: boolean;
|
|
13
|
+
dangerouslyUseHTMLString?: boolean;
|
|
14
|
+
}): void;
|
|
15
|
+
|
|
16
|
+
export { createEbMessage };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-QGM4M3NI.js');
|
|
2
|
+
|
|
3
|
+
// src/functionalComponent/EbMessage.ts
|
|
4
|
+
var _elementplus = require('element-plus');
|
|
5
|
+
function createEbMessage({
|
|
6
|
+
title,
|
|
7
|
+
message = "\u63D0\u793A",
|
|
8
|
+
// 消息
|
|
9
|
+
type = "info",
|
|
10
|
+
// 类型
|
|
11
|
+
// grouping = false, // 是否合并内容相同的消息
|
|
12
|
+
duration = 3e3,
|
|
13
|
+
// 消息停留时间
|
|
14
|
+
offset = 40,
|
|
15
|
+
// 偏移量
|
|
16
|
+
showClose = true,
|
|
17
|
+
// 是否显示关闭按钮
|
|
18
|
+
dangerouslyUseHTMLString = false
|
|
19
|
+
// 是否将 message 属性作为 HTML 片段处理
|
|
20
|
+
}) {
|
|
21
|
+
_elementplus.ElNotification.call(void 0, { title, message, type, duration, offset, zIndex: 9999, showClose, dangerouslyUseHTMLString });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
exports.createEbMessage = createEbMessage;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "../chunk-6DZX6EAA.mjs";
|
|
2
|
+
|
|
3
|
+
// src/functionalComponent/EbMessage.ts
|
|
4
|
+
import { ElNotification } from "element-plus";
|
|
5
|
+
function createEbMessage({
|
|
6
|
+
title,
|
|
7
|
+
message = "\u63D0\u793A",
|
|
8
|
+
// 消息
|
|
9
|
+
type = "info",
|
|
10
|
+
// 类型
|
|
11
|
+
// grouping = false, // 是否合并内容相同的消息
|
|
12
|
+
duration = 3e3,
|
|
13
|
+
// 消息停留时间
|
|
14
|
+
offset = 40,
|
|
15
|
+
// 偏移量
|
|
16
|
+
showClose = true,
|
|
17
|
+
// 是否显示关闭按钮
|
|
18
|
+
dangerouslyUseHTMLString = false
|
|
19
|
+
// 是否将 message 属性作为 HTML 片段处理
|
|
20
|
+
}) {
|
|
21
|
+
ElNotification({ title, message, type, duration, offset, zIndex: 9999, showClose, dangerouslyUseHTMLString });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
createEbMessage
|
|
25
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 更新文档标题,根据网站标题和路由元信息组合生成最终标题
|
|
3
|
+
*
|
|
4
|
+
* @param websiteTitle 网站基础标题字符串,当未提供时会转为空字符串处理
|
|
5
|
+
* @param to 包含页面元信息的对象,需包含可能带有标题的meta对象
|
|
6
|
+
*/
|
|
7
|
+
declare function updateDocumentTitle(websiteTitle: string, to: {
|
|
8
|
+
meta?: {
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
}): void;
|
|
12
|
+
interface MenuItem {
|
|
13
|
+
path: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
redirect?: string;
|
|
16
|
+
component?: any;
|
|
17
|
+
meta?: {
|
|
18
|
+
title: string;
|
|
19
|
+
icon?: string;
|
|
20
|
+
openState?: boolean;
|
|
21
|
+
isExcelLayout?: boolean;
|
|
22
|
+
hidden?: boolean;
|
|
23
|
+
};
|
|
24
|
+
children?: MenuItem[];
|
|
25
|
+
sheets?: MenuItem[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 菜单过滤器,用于去除隐藏的菜单项
|
|
29
|
+
* @param data 菜单项数组
|
|
30
|
+
* @returns 过滤后的菜单项数组
|
|
31
|
+
*/
|
|
32
|
+
declare function filterMenu(data: MenuItem[]): MenuItem[];
|
|
33
|
+
|
|
34
|
+
export { type MenuItem as M, filterMenu as f, updateDocumentTitle as u };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 更新文档标题,根据网站标题和路由元信息组合生成最终标题
|
|
3
|
+
*
|
|
4
|
+
* @param websiteTitle 网站基础标题字符串,当未提供时会转为空字符串处理
|
|
5
|
+
* @param to 包含页面元信息的对象,需包含可能带有标题的meta对象
|
|
6
|
+
*/
|
|
7
|
+
declare function updateDocumentTitle(websiteTitle: string, to: {
|
|
8
|
+
meta?: {
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
}): void;
|
|
12
|
+
interface MenuItem {
|
|
13
|
+
path: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
redirect?: string;
|
|
16
|
+
component?: any;
|
|
17
|
+
meta?: {
|
|
18
|
+
title: string;
|
|
19
|
+
icon?: string;
|
|
20
|
+
openState?: boolean;
|
|
21
|
+
isExcelLayout?: boolean;
|
|
22
|
+
hidden?: boolean;
|
|
23
|
+
};
|
|
24
|
+
children?: MenuItem[];
|
|
25
|
+
sheets?: MenuItem[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 菜单过滤器,用于去除隐藏的菜单项
|
|
29
|
+
* @param data 菜单项数组
|
|
30
|
+
* @returns 过滤后的菜单项数组
|
|
31
|
+
*/
|
|
32
|
+
declare function filterMenu(data: MenuItem[]): MenuItem[];
|
|
33
|
+
|
|
34
|
+
export { type MenuItem as M, filterMenu as f, updateDocumentTitle as u };
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* src/styles/index.css */
|
|
2
|
+
html,
|
|
3
|
+
body {
|
|
4
|
+
height: 100%;
|
|
5
|
+
width: 100%;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
min-width: 100px;
|
|
9
|
+
min-height: 100%;
|
|
10
|
+
font-family:
|
|
11
|
+
"Roboto",
|
|
12
|
+
"-apple-system",
|
|
13
|
+
"Helvetica Neue",
|
|
14
|
+
Helvetica,
|
|
15
|
+
Arial,
|
|
16
|
+
sans-serif;
|
|
17
|
+
-ms-text-size-adjust: 100%;
|
|
18
|
+
-webkit-text-size-adjust: 100%;
|
|
19
|
+
-webkit-font-smoothing: antialiased;
|
|
20
|
+
-moz-osx-font-smoothing: grayscale;
|
|
21
|
+
line-height: 1.5;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
*,
|
|
27
|
+
*:before,
|
|
28
|
+
*:after {
|
|
29
|
+
box-sizing: inherit;
|
|
30
|
+
-webkit-tap-highlight-color: transparent;
|
|
31
|
+
}
|
|
32
|
+
:root {
|
|
33
|
+
--el-color-primary: var(--eb-color-primary) !important;
|
|
34
|
+
--el-color-primary-light-1: var(--eb-color-primary-light-1) !important;
|
|
35
|
+
--el-color-primary-light-2: var(--eb-color-primary-light-2) !important;
|
|
36
|
+
--el-color-primary-light-3: var(--eb-color-primary-light-3) !important;
|
|
37
|
+
--el-color-primary-light-4: var(--eb-color-primary-light-4) !important;
|
|
38
|
+
--el-color-primary-light-5: var(--eb-color-primary-light-5) !important;
|
|
39
|
+
--el-color-primary-light-6: var(--eb-color-primary-light-6) !important;
|
|
40
|
+
--el-color-primary-light-7: var(--eb-color-primary-light-7) !important;
|
|
41
|
+
--el-color-primary-light-8: var(--eb-color-primary-light-8) !important;
|
|
42
|
+
--el-color-primary-light-9: var(--eb-color-primary-light-9) !important;
|
|
43
|
+
--el-color-primary-dark-1: var(--eb-color-primary-dark-1) !important;
|
|
44
|
+
--el-color-primary-dark-2: var(--eb-color-primary-dark-2) !important;
|
|
45
|
+
--el-color-primary-dark-3: var(--eb-color-primary-dark-3) !important;
|
|
46
|
+
--el-color-primary-dark-4: var(--eb-color-primary-dark-4) !important;
|
|
47
|
+
--el-color-primary-dark-5: var(--eb-color-primary-dark-5) !important;
|
|
48
|
+
--el-color-primary-dark-6: var(--eb-color-primary-dark-6) !important;
|
|
49
|
+
--el-color-primary-dark-7: var(--eb-color-primary-dark-7) !important;
|
|
50
|
+
--el-color-primary-dark-8: var(--eb-color-primary-dark-8) !important;
|
|
51
|
+
--el-color-primary-dark-9: var(--eb-color-primary-dark-9) !important;
|
|
52
|
+
}
|
|
53
|
+
.hover-unline::after {
|
|
54
|
+
content: "";
|
|
55
|
+
position: absolute;
|
|
56
|
+
left: 50%;
|
|
57
|
+
bottom: 0;
|
|
58
|
+
display: block;
|
|
59
|
+
width: 0%;
|
|
60
|
+
height: 0.005208rem;
|
|
61
|
+
transition: all 0.3s ease-in-out;
|
|
62
|
+
background-color: currentColor;
|
|
63
|
+
transform: translateX(-50%);
|
|
64
|
+
}
|
|
65
|
+
.hover-unline:hover {
|
|
66
|
+
&::after {
|
|
67
|
+
width: 100%;
|
|
68
|
+
}
|
|
69
|
+
}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { FormState, clamp, curlParams, duplicateRemovalCompleteSort, encryptPwd, formatNumber, getDecimalPart, getIntegerPart, isInteger, isNumber, jsonp, listSort, numberToChinese, padZero, parseFormattedNumber, prototypeInterceptor, request, roundOrTruncate, setupPermission, timeFix, useLoginHook, welcome } from './utils/index.mjs';
|
|
2
|
+
export { M as MenuItem, f as filterMenu, u as updateDocumentTitle } from './index-CVmrbYyU.mjs';
|
|
3
|
+
export { createBaseViteConfig } from './vite-config/index.mjs';
|
|
4
|
+
export { MenuState, store, useCommonStore, useDbStore, useMenuStore } from './stores/index.mjs';
|
|
5
|
+
export { default as createUnoConfig } from './uno-config/index.mjs';
|
|
6
|
+
export { AxiosResponse } from 'axios';
|
|
7
|
+
import 'vue';
|
|
8
|
+
import 'vue-router';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import 'pinia';
|
|
11
|
+
import 'unocss';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { FormState, clamp, curlParams, duplicateRemovalCompleteSort, encryptPwd, formatNumber, getDecimalPart, getIntegerPart, isInteger, isNumber, jsonp, listSort, numberToChinese, padZero, parseFormattedNumber, prototypeInterceptor, request, roundOrTruncate, setupPermission, timeFix, useLoginHook, welcome } from './utils/index.js';
|
|
2
|
+
export { M as MenuItem, f as filterMenu, u as updateDocumentTitle } from './index-CVmrbYyU.js';
|
|
3
|
+
export { createBaseViteConfig } from './vite-config/index.js';
|
|
4
|
+
export { MenuState, store, useCommonStore, useDbStore, useMenuStore } from './stores/index.js';
|
|
5
|
+
export { default as createUnoConfig } from './uno-config/index.js';
|
|
6
|
+
export { AxiosResponse } from 'axios';
|
|
7
|
+
import 'vue';
|
|
8
|
+
import 'vue-router';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import 'pinia';
|
|
11
|
+
import 'unocss';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkMXO66M74js = require('./chunk-MXO66M74.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var _chunkQQPGJGSUjs = require('./chunk-QQPGJGSU.js');
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
var _chunkLATZ6U6Ajs = require('./chunk-LATZ6U6A.js');
|
|
35
|
+
require('./chunk-QGM4M3NI.js');
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
exports.clamp = _chunkQQPGJGSUjs.clamp; exports.createBaseViteConfig = _chunkLATZ6U6Ajs.createBaseViteConfig; exports.createUnoConfig = _chunkMXO66M74js.createUnoConfig; exports.duplicateRemovalCompleteSort = _chunkQQPGJGSUjs.duplicateRemovalCompleteSort; exports.encryptPwd = _chunkQQPGJGSUjs.encryptPwd; exports.filterMenu = _chunkQQPGJGSUjs.filterMenu; exports.formatNumber = _chunkQQPGJGSUjs.formatNumber; exports.getDecimalPart = _chunkQQPGJGSUjs.getDecimalPart; exports.getIntegerPart = _chunkQQPGJGSUjs.getIntegerPart; exports.isInteger = _chunkQQPGJGSUjs.isInteger; exports.isNumber = _chunkQQPGJGSUjs.isNumber; exports.jsonp = _chunkQQPGJGSUjs.jsonp; exports.listSort = _chunkQQPGJGSUjs.listSort; exports.numberToChinese = _chunkQQPGJGSUjs.numberToChinese; exports.padZero = _chunkQQPGJGSUjs.padZero; exports.parseFormattedNumber = _chunkQQPGJGSUjs.parseFormattedNumber; exports.prototypeInterceptor = _chunkQQPGJGSUjs.prototypeInterceptor; exports.request = _chunkQQPGJGSUjs.request; exports.roundOrTruncate = _chunkQQPGJGSUjs.roundOrTruncate; exports.setupPermission = _chunkQQPGJGSUjs.setupPermission; exports.store = _chunkQQPGJGSUjs.store; exports.timeFix = _chunkQQPGJGSUjs.timeFix; exports.updateDocumentTitle = _chunkQQPGJGSUjs.updateDocumentTitle; exports.useCommonStore = _chunkQQPGJGSUjs.useCommonStore; exports.useDbStore = _chunkQQPGJGSUjs.useDbStore; exports.useLoginHook = _chunkQQPGJGSUjs.useLoginHook; exports.useMenuStore = _chunkQQPGJGSUjs.useMenuStore; exports.welcome = _chunkQQPGJGSUjs.welcome;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createUnoConfig
|
|
3
|
+
} from "./chunk-OW2EL2VY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
clamp,
|
|
6
|
+
duplicateRemovalCompleteSort,
|
|
7
|
+
encryptPwd,
|
|
8
|
+
filterMenu,
|
|
9
|
+
formatNumber,
|
|
10
|
+
getDecimalPart,
|
|
11
|
+
getIntegerPart,
|
|
12
|
+
isInteger,
|
|
13
|
+
isNumber,
|
|
14
|
+
jsonp,
|
|
15
|
+
listSort,
|
|
16
|
+
numberToChinese,
|
|
17
|
+
padZero,
|
|
18
|
+
parseFormattedNumber,
|
|
19
|
+
prototypeInterceptor,
|
|
20
|
+
request,
|
|
21
|
+
roundOrTruncate,
|
|
22
|
+
setupPermission,
|
|
23
|
+
store,
|
|
24
|
+
timeFix,
|
|
25
|
+
updateDocumentTitle,
|
|
26
|
+
useCommonStore,
|
|
27
|
+
useDbStore,
|
|
28
|
+
useLoginHook,
|
|
29
|
+
useMenuStore,
|
|
30
|
+
welcome
|
|
31
|
+
} from "./chunk-RRULL645.mjs";
|
|
32
|
+
import {
|
|
33
|
+
createBaseViteConfig
|
|
34
|
+
} from "./chunk-G4JQ2UQV.mjs";
|
|
35
|
+
import "./chunk-6DZX6EAA.mjs";
|
|
36
|
+
export {
|
|
37
|
+
clamp,
|
|
38
|
+
createBaseViteConfig,
|
|
39
|
+
createUnoConfig,
|
|
40
|
+
duplicateRemovalCompleteSort,
|
|
41
|
+
encryptPwd,
|
|
42
|
+
filterMenu,
|
|
43
|
+
formatNumber,
|
|
44
|
+
getDecimalPart,
|
|
45
|
+
getIntegerPart,
|
|
46
|
+
isInteger,
|
|
47
|
+
isNumber,
|
|
48
|
+
jsonp,
|
|
49
|
+
listSort,
|
|
50
|
+
numberToChinese,
|
|
51
|
+
padZero,
|
|
52
|
+
parseFormattedNumber,
|
|
53
|
+
prototypeInterceptor,
|
|
54
|
+
request,
|
|
55
|
+
roundOrTruncate,
|
|
56
|
+
setupPermission,
|
|
57
|
+
store,
|
|
58
|
+
timeFix,
|
|
59
|
+
updateDocumentTitle,
|
|
60
|
+
useCommonStore,
|
|
61
|
+
useDbStore,
|
|
62
|
+
useLoginHook,
|
|
63
|
+
useMenuStore,
|
|
64
|
+
welcome
|
|
65
|
+
};
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import * as pinia from 'pinia';
|
|
3
|
+
import { Router } from 'vue-router';
|
|
4
|
+
import { M as MenuItem } from '../index-CVmrbYyU.mjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 分页用的消息
|
|
8
|
+
*/
|
|
9
|
+
interface IDbPager {
|
|
10
|
+
/**
|
|
11
|
+
* 开始的序号,从 0 开始
|
|
12
|
+
*/
|
|
13
|
+
start: number;
|
|
14
|
+
/**
|
|
15
|
+
* 提取的数量
|
|
16
|
+
*/
|
|
17
|
+
count: number;
|
|
18
|
+
/**
|
|
19
|
+
* 排序方向
|
|
20
|
+
*/
|
|
21
|
+
description: 'next';
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
indexValue: number;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
betweenInfo: {
|
|
30
|
+
v1: number;
|
|
31
|
+
v2: number;
|
|
32
|
+
v1isClose: boolean;
|
|
33
|
+
v2isClose: boolean;
|
|
34
|
+
};
|
|
35
|
+
where: (object: any) => boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 分页后返回的对象列表
|
|
39
|
+
*/
|
|
40
|
+
interface IDbPagerDataList<T> {
|
|
41
|
+
/**
|
|
42
|
+
* 记录集
|
|
43
|
+
*/
|
|
44
|
+
dataList: T[];
|
|
45
|
+
/**
|
|
46
|
+
* 复合条件的总数
|
|
47
|
+
*/
|
|
48
|
+
allCount: number;
|
|
49
|
+
}
|
|
50
|
+
type queryT = string | number | boolean | any;
|
|
51
|
+
/**
|
|
52
|
+
* 查询方式的枚举
|
|
53
|
+
*/
|
|
54
|
+
declare const enum EFindKind {
|
|
55
|
+
strEqual = 21,// '{col} = ?'
|
|
56
|
+
strNotEqual = 22,// '{col} <> ?'
|
|
57
|
+
strInclude = 23,// '{col} like "%?%"'
|
|
58
|
+
strNotInclude = 24,// '{col} not like "%?%"'
|
|
59
|
+
strStart = 25,// '{col} like "?%"'
|
|
60
|
+
strEnd = 26,// '{col} like "%?"'
|
|
61
|
+
strNotStart = 27,// '{col} not like "?%"'
|
|
62
|
+
strNotEnd = 28,// '{col} not like "%?"'
|
|
63
|
+
numEqual = 11,// '{col} = ?'
|
|
64
|
+
numNotEqual = 12,// '{col} <> ?'
|
|
65
|
+
numInclude = 13,// '{col} > ?'
|
|
66
|
+
numNotInclude = 14,// '{col} >= ?'
|
|
67
|
+
numStart = 15,// '{col} < ?'
|
|
68
|
+
numEnd = 16,// '{col} <= ?'
|
|
69
|
+
numBetween = 17,// '{col} between ? and ?'
|
|
70
|
+
numBetweenEnd = 18,// '{col} > ? and {col} <= ?'
|
|
71
|
+
numBetweenStart = 19,// '{col} >= ? and {col} < ?'
|
|
72
|
+
rangeInclude = 40,// '( {col} like %?% or {col} like %?% ... ) '
|
|
73
|
+
rangeIn = 41,// '{col} in (?)'
|
|
74
|
+
rangeNotIn = 42
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 查询条件,字段名作为key,后面是数组(元祖)
|
|
78
|
+
*/
|
|
79
|
+
interface DbQuery {
|
|
80
|
+
[colName: idType]: [
|
|
81
|
+
EFindKind,
|
|
82
|
+
queryT | Array<queryT> | [
|
|
83
|
+
queryT,
|
|
84
|
+
queryT
|
|
85
|
+
]
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
type obj = {
|
|
90
|
+
[key: string]: any;
|
|
91
|
+
};
|
|
92
|
+
type myStore = {
|
|
93
|
+
[storeName: string]: any;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* indexedDB 的 help,基础功能的封装
|
|
97
|
+
* * 打开数据库,建立对象仓库,获取连接对象,实现增删改查
|
|
98
|
+
* * info 的结构:
|
|
99
|
+
* * * dbFlag: '' // 数据库标识,区别不同的数据库
|
|
100
|
+
* * * dbConfig: { // 连接数据库
|
|
101
|
+
* * * * dbName: '数据库名称',
|
|
102
|
+
* * * * ver: '数据库版本',
|
|
103
|
+
* * * },
|
|
104
|
+
* * * stores: {
|
|
105
|
+
* * * * storeName: { // 对象仓库名称
|
|
106
|
+
* * * * * id: 'id', // 主键名称
|
|
107
|
+
* * * * * autoIncrement?: true, // 主键值要自增
|
|
108
|
+
* * * * * index?: { // 可以不设置索引
|
|
109
|
+
* * * * * * name: ture, // key:索引名称;value:是否唯一
|
|
110
|
+
* * * * * }
|
|
111
|
+
* * * * }
|
|
112
|
+
* * * },
|
|
113
|
+
* * * init: (help) => {} // 完全准备好之后的回调函数
|
|
114
|
+
*/
|
|
115
|
+
declare class IndexedDBHelp {
|
|
116
|
+
myIndexedDB: IDBFactory;
|
|
117
|
+
dbName: string;
|
|
118
|
+
dbVer: number;
|
|
119
|
+
_db: IDBDatabase | undefined;
|
|
120
|
+
_storeState: string;
|
|
121
|
+
_storeInfo: any;
|
|
122
|
+
_regCallback: Array<() => void>;
|
|
123
|
+
_stores: myStore;
|
|
124
|
+
constructor(info: any);
|
|
125
|
+
close(): void;
|
|
126
|
+
beginInit(storeName: string[]): Promise<IDBObjectStore>;
|
|
127
|
+
beginWrite(storeName: string[]): Promise<IDBTransaction>;
|
|
128
|
+
beginReadonly(storeName: string[]): Promise<IDBTransaction>;
|
|
129
|
+
/**
|
|
130
|
+
* 删掉整个库
|
|
131
|
+
*/
|
|
132
|
+
deleteDB(): Promise<any>;
|
|
133
|
+
/**
|
|
134
|
+
* 清空一个对象仓库的全部对象
|
|
135
|
+
* @param storeName 对象仓库名称
|
|
136
|
+
* @param tran 事务,可以为 null
|
|
137
|
+
* @returns
|
|
138
|
+
*/
|
|
139
|
+
clearStore(storeName: string, tran?: IDBTransaction): Promise<0>;
|
|
140
|
+
/**
|
|
141
|
+
* 添加一个对象
|
|
142
|
+
* @param storeName 对象仓库名称
|
|
143
|
+
* @param model 要添加的对象
|
|
144
|
+
* @param tran 事务,可以为 null
|
|
145
|
+
* @returns
|
|
146
|
+
*/
|
|
147
|
+
addModel<T>(storeName: string, model: T, tran?: IDBTransaction): Promise<string | number>;
|
|
148
|
+
/**
|
|
149
|
+
* 修改一个对象
|
|
150
|
+
* @param storeName 对象仓库名称
|
|
151
|
+
* @param model 要修改的对象
|
|
152
|
+
* @param idValue 对象主键的值,如果主键是id,可以传入null
|
|
153
|
+
* @param tran 事务,可以为 null
|
|
154
|
+
* @returns
|
|
155
|
+
*/
|
|
156
|
+
putModel<T extends obj>(storeName: string, model: T, tran?: IDBTransaction): Promise<T>;
|
|
157
|
+
/**
|
|
158
|
+
* 添加或者替换一个对象
|
|
159
|
+
* @param storeName 对象仓库名称
|
|
160
|
+
* @param model 要添加或者修改的对象
|
|
161
|
+
* @param tran 事务,可以为 null
|
|
162
|
+
* @returns
|
|
163
|
+
*/
|
|
164
|
+
setModel<T extends obj>(storeName: string, model: T, tran?: IDBTransaction): Promise<T>;
|
|
165
|
+
/**
|
|
166
|
+
* 删除一个对象
|
|
167
|
+
* @param storeName 对象仓库名称
|
|
168
|
+
* @param idValue id 或者 model 要删除的对象
|
|
169
|
+
* @param tran 事务,可以为 null
|
|
170
|
+
* @returns
|
|
171
|
+
*/
|
|
172
|
+
delModel(storeName: string, idValue: any, tran?: IDBTransaction): Promise<number>;
|
|
173
|
+
/**
|
|
174
|
+
* 获取一个对象,或者仓库的全部对象
|
|
175
|
+
* @param storeName 对象仓库名称
|
|
176
|
+
* @param idValue null:获取仓库的全部对象;其他:对象ID值
|
|
177
|
+
* @param tran 事务,可以为 null
|
|
178
|
+
* @returns
|
|
179
|
+
*/
|
|
180
|
+
getModel<T>(storeName: string, idValue?: IDBValidKey | IDBKeyRange | null, tran?: IDBTransaction): Promise<T | T[]>;
|
|
181
|
+
/**
|
|
182
|
+
* 获取对象仓库里全部对象的数量
|
|
183
|
+
* @param storeName 对象仓库名称
|
|
184
|
+
* @param tran 事务,可以为 null
|
|
185
|
+
* @returns
|
|
186
|
+
*/
|
|
187
|
+
getCount(storeName: string, tran?: IDBTransaction): Promise<number>;
|
|
188
|
+
/**
|
|
189
|
+
* 获取一个仓库的全部对象
|
|
190
|
+
* @param storeName 对象仓库名称
|
|
191
|
+
* @param query 查询条件
|
|
192
|
+
* @param description
|
|
193
|
+
* @param tran 事务,可以为 null
|
|
194
|
+
* @returns
|
|
195
|
+
*/
|
|
196
|
+
getList<T>(storeName: string, query: DbQuery, description?: IDBCursorDirection, tran?: IDBTransaction): Promise<Array<T>>;
|
|
197
|
+
/**
|
|
198
|
+
* 获取一个仓库的全部对象
|
|
199
|
+
* @param storeName 对象仓库名称
|
|
200
|
+
* @param query 查询条件
|
|
201
|
+
* @param pager 分页信息
|
|
202
|
+
* @param tran 事务,可以为 null
|
|
203
|
+
* @returns
|
|
204
|
+
*/
|
|
205
|
+
listPager<T>(storeName: string, query: DbQuery, pager: IDbPager, tran?: IDBTransaction): Promise<IDbPagerDataList<T>>;
|
|
206
|
+
/**
|
|
207
|
+
* 创建对象仓库的增删改查的函数
|
|
208
|
+
* @returns
|
|
209
|
+
*/
|
|
210
|
+
stores(): myStore;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare const useDbStore: pinia.StoreDefinition<"db", Pick<{
|
|
214
|
+
db: IndexedDBHelp;
|
|
215
|
+
getDb: () => IndexedDBHelp;
|
|
216
|
+
}, "db">, Pick<{
|
|
217
|
+
db: IndexedDBHelp;
|
|
218
|
+
getDb: () => IndexedDBHelp;
|
|
219
|
+
}, never>, Pick<{
|
|
220
|
+
db: IndexedDBHelp;
|
|
221
|
+
getDb: () => IndexedDBHelp;
|
|
222
|
+
}, "getDb">>;
|
|
223
|
+
|
|
224
|
+
interface CommonState {
|
|
225
|
+
[key: string]: any;
|
|
226
|
+
curlBaseUrl: string;
|
|
227
|
+
version: string;
|
|
228
|
+
readonly currentEnv: 'development' | 'test' | 'production';
|
|
229
|
+
routeWhitelist: string[];
|
|
230
|
+
websiteTitle: string;
|
|
231
|
+
systemTitle: string;
|
|
232
|
+
updateLog: {
|
|
233
|
+
version: string;
|
|
234
|
+
time: string;
|
|
235
|
+
content: {
|
|
236
|
+
title: string;
|
|
237
|
+
content: string[];
|
|
238
|
+
};
|
|
239
|
+
}[];
|
|
240
|
+
themeColor: string;
|
|
241
|
+
}
|
|
242
|
+
declare const useCommonStore: pinia.StoreDefinition<"common", CommonState, {
|
|
243
|
+
getCurlBaseUrl(): CommonState["curlBaseUrl"];
|
|
244
|
+
getVersion(): CommonState["version"];
|
|
245
|
+
getCurrentEnv(): CommonState["currentEnv"];
|
|
246
|
+
getRouteWhitelist(): CommonState["routeWhitelist"];
|
|
247
|
+
getWebsiteTitle(): CommonState["websiteTitle"];
|
|
248
|
+
getUpdateLog(): CommonState["updateLog"];
|
|
249
|
+
getSystemTitle(): CommonState["systemTitle"];
|
|
250
|
+
getPublicUrl(): string;
|
|
251
|
+
getThemeColor(): CommonState["themeColor"];
|
|
252
|
+
}, {
|
|
253
|
+
/**
|
|
254
|
+
* 加载配置
|
|
255
|
+
*/
|
|
256
|
+
loadConfig(): Promise<void>;
|
|
257
|
+
/**
|
|
258
|
+
* 加载更新日志
|
|
259
|
+
*/
|
|
260
|
+
loadUpdateLog(): Promise<void>;
|
|
261
|
+
/**
|
|
262
|
+
* 判断当前环境
|
|
263
|
+
* @returns {{isDev: () => boolean, isTest: () => boolean, isProd: () => boolean}}
|
|
264
|
+
*/
|
|
265
|
+
isCurrentEnv(): {
|
|
266
|
+
isDev: () => boolean;
|
|
267
|
+
isTest: () => boolean;
|
|
268
|
+
isProd: () => boolean;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* 设置主题色
|
|
272
|
+
*/
|
|
273
|
+
changeThemeColor(color: string): void;
|
|
274
|
+
}>;
|
|
275
|
+
|
|
276
|
+
interface MenuState {
|
|
277
|
+
collapsed: boolean;
|
|
278
|
+
accordionEffect: boolean;
|
|
279
|
+
menuList: MenuItem[];
|
|
280
|
+
hasGetMenuList: boolean;
|
|
281
|
+
}
|
|
282
|
+
declare const useMenuStore: pinia.StoreDefinition<"menu", MenuState, {
|
|
283
|
+
getMenuList(): MenuItem[];
|
|
284
|
+
getHasGetMenuList(): boolean;
|
|
285
|
+
}, {
|
|
286
|
+
toggleCollapsed(collapsed?: MenuState["collapsed"]): void;
|
|
287
|
+
queryMenuList(router: Router, pages: any): Promise<void>;
|
|
288
|
+
}>;
|
|
289
|
+
|
|
290
|
+
declare function store(app: App, option?: {
|
|
291
|
+
prefix?: string;
|
|
292
|
+
}): void;
|
|
293
|
+
|
|
294
|
+
export { type MenuState, store, useCommonStore, useDbStore, useMenuStore };
|