@jnrs/vue-core 1.1.5 → 1.1.7
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 +12 -1
- package/dist/components/JnImageView.vue.d.ts +21 -0
- package/dist/components/JnPdfView.vue.d.ts +25 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +228 -57
- package/dist/index-KdP2kDTZ.js +201 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3275 -4
- package/dist/locales/en/components.d.ts +35 -0
- package/dist/locales/{en.d.ts → en/index.d.ts} +8 -0
- package/dist/locales/index.js +70 -54
- package/dist/locales/zhCn/components.d.ts +35 -0
- package/dist/locales/{zhCn.d.ts → zhCn/index.d.ts} +8 -0
- package/dist/piniaStore/base/auth.d.ts +3 -3
- package/dist/piniaStore/index.d.ts +1 -0
- package/dist/piniaStore/index.js +5 -5
- package/dist/piniaStore/mock.d.ts +11 -0
- package/dist/request/axios.d.ts +6 -0
- package/dist/request/fetch.d.ts +0 -0
- package/dist/utils/index.d.ts +0 -0
- package/package.json +4 -3
- package/dist/index-CfK0PRAy.js +0 -106
- package/dist/system-KZETuQYC.js +0 -91
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
GlobalSetting: {
|
|
3
|
+
title: string;
|
|
4
|
+
isMockServer: string;
|
|
5
|
+
language: string;
|
|
6
|
+
languageOptions: {
|
|
7
|
+
zhCn: string;
|
|
8
|
+
en: string;
|
|
9
|
+
};
|
|
10
|
+
theme: string;
|
|
11
|
+
themeOptions: {
|
|
12
|
+
light: string;
|
|
13
|
+
dark: string;
|
|
14
|
+
auto: string;
|
|
15
|
+
};
|
|
16
|
+
primaryColor: string;
|
|
17
|
+
primaryColorOptions: {
|
|
18
|
+
jnrs: string;
|
|
19
|
+
azure: string;
|
|
20
|
+
moonYellow: string;
|
|
21
|
+
jdRed: string;
|
|
22
|
+
taobaoRed: string;
|
|
23
|
+
dingtalkBlue: string;
|
|
24
|
+
wechatGreen: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
JnImageView: {
|
|
28
|
+
noDisplay: string;
|
|
29
|
+
};
|
|
30
|
+
JnPdfView: {
|
|
31
|
+
viewPDF: string;
|
|
32
|
+
downloadFile: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
@@ -3,6 +3,7 @@ declare const _default: {
|
|
|
3
3
|
components: {
|
|
4
4
|
GlobalSetting: {
|
|
5
5
|
title: string;
|
|
6
|
+
isMockServer: string;
|
|
6
7
|
language: string;
|
|
7
8
|
languageOptions: {
|
|
8
9
|
zhCn: string;
|
|
@@ -25,6 +26,13 @@ declare const _default: {
|
|
|
25
26
|
wechatGreen: string;
|
|
26
27
|
};
|
|
27
28
|
};
|
|
29
|
+
JnImageView: {
|
|
30
|
+
noDisplay: string;
|
|
31
|
+
};
|
|
32
|
+
JnPdfView: {
|
|
33
|
+
viewPDF: string;
|
|
34
|
+
downloadFile: string;
|
|
35
|
+
};
|
|
28
36
|
};
|
|
29
37
|
};
|
|
30
38
|
};
|
package/dist/locales/index.js
CHANGED
|
@@ -1,63 +1,79 @@
|
|
|
1
1
|
const e = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
wechatGreen: "微信绿"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
2
|
+
GlobalSetting: {
|
|
3
|
+
title: "全局偏好设置",
|
|
4
|
+
isMockServer: "是否使用 mock 服务器",
|
|
5
|
+
language: "语言",
|
|
6
|
+
languageOptions: {
|
|
7
|
+
zhCn: "简体中文",
|
|
8
|
+
en: "English"
|
|
9
|
+
},
|
|
10
|
+
theme: "主题",
|
|
11
|
+
themeOptions: {
|
|
12
|
+
light: "浅色",
|
|
13
|
+
dark: "深色",
|
|
14
|
+
auto: "跟随系统"
|
|
15
|
+
},
|
|
16
|
+
primaryColor: "强调色",
|
|
17
|
+
primaryColorOptions: {
|
|
18
|
+
jnrs: "JNRS",
|
|
19
|
+
azure: "蔚蓝",
|
|
20
|
+
moonYellow: "月黄",
|
|
21
|
+
jdRed: "京东红",
|
|
22
|
+
taobaoRed: "淘宝红",
|
|
23
|
+
dingtalkBlue: "钉钉蓝",
|
|
24
|
+
wechatGreen: "微信绿"
|
|
28
25
|
}
|
|
26
|
+
},
|
|
27
|
+
JnImageView: {
|
|
28
|
+
noDisplay: "无法显示"
|
|
29
|
+
},
|
|
30
|
+
JnPdfView: {
|
|
31
|
+
viewPDF: "预览PDF",
|
|
32
|
+
downloadFile: "下载文件"
|
|
29
33
|
}
|
|
30
|
-
},
|
|
34
|
+
}, n = {
|
|
31
35
|
"@jnrs/vue-core": {
|
|
32
|
-
components:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
36
|
+
components: e
|
|
37
|
+
}
|
|
38
|
+
}, o = {
|
|
39
|
+
GlobalSetting: {
|
|
40
|
+
title: "Global Preferences",
|
|
41
|
+
isMockServer: "Use Mock Server",
|
|
42
|
+
language: "Language",
|
|
43
|
+
languageOptions: {
|
|
44
|
+
zhCn: "简体中文",
|
|
45
|
+
en: "English"
|
|
46
|
+
},
|
|
47
|
+
theme: "Theme",
|
|
48
|
+
themeOptions: {
|
|
49
|
+
light: "Light",
|
|
50
|
+
dark: "Dark",
|
|
51
|
+
auto: "Follow System"
|
|
52
|
+
},
|
|
53
|
+
primaryColor: "Primary Color",
|
|
54
|
+
primaryColorOptions: {
|
|
55
|
+
jnrs: "JNRS",
|
|
56
|
+
azure: "Azure",
|
|
57
|
+
moonYellow: "Moon Yellow",
|
|
58
|
+
jdRed: "JD Red",
|
|
59
|
+
taobaoRed: "Taobao Red",
|
|
60
|
+
dingtalkBlue: "DingTalk Blue",
|
|
61
|
+
wechatGreen: "WeChat Green"
|
|
57
62
|
}
|
|
63
|
+
},
|
|
64
|
+
JnImageView: {
|
|
65
|
+
noDisplay: "Cannot Display"
|
|
66
|
+
},
|
|
67
|
+
JnPdfView: {
|
|
68
|
+
viewPDF: "Preview PDF",
|
|
69
|
+
downloadFile: "Download File"
|
|
70
|
+
}
|
|
71
|
+
}, a = {
|
|
72
|
+
"@jnrs/vue-core": {
|
|
73
|
+
components: o
|
|
58
74
|
}
|
|
59
75
|
};
|
|
60
76
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
77
|
+
a as en,
|
|
78
|
+
n as zhCn
|
|
63
79
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
GlobalSetting: {
|
|
3
|
+
title: string;
|
|
4
|
+
isMockServer: string;
|
|
5
|
+
language: string;
|
|
6
|
+
languageOptions: {
|
|
7
|
+
zhCn: string;
|
|
8
|
+
en: string;
|
|
9
|
+
};
|
|
10
|
+
theme: string;
|
|
11
|
+
themeOptions: {
|
|
12
|
+
light: string;
|
|
13
|
+
dark: string;
|
|
14
|
+
auto: string;
|
|
15
|
+
};
|
|
16
|
+
primaryColor: string;
|
|
17
|
+
primaryColorOptions: {
|
|
18
|
+
jnrs: string;
|
|
19
|
+
azure: string;
|
|
20
|
+
moonYellow: string;
|
|
21
|
+
jdRed: string;
|
|
22
|
+
taobaoRed: string;
|
|
23
|
+
dingtalkBlue: string;
|
|
24
|
+
wechatGreen: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
JnImageView: {
|
|
28
|
+
noDisplay: string;
|
|
29
|
+
};
|
|
30
|
+
JnPdfView: {
|
|
31
|
+
viewPDF: string;
|
|
32
|
+
downloadFile: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
@@ -3,6 +3,7 @@ declare const _default: {
|
|
|
3
3
|
components: {
|
|
4
4
|
GlobalSetting: {
|
|
5
5
|
title: string;
|
|
6
|
+
isMockServer: string;
|
|
6
7
|
language: string;
|
|
7
8
|
languageOptions: {
|
|
8
9
|
zhCn: string;
|
|
@@ -25,6 +26,13 @@ declare const _default: {
|
|
|
25
26
|
wechatGreen: string;
|
|
26
27
|
};
|
|
27
28
|
};
|
|
29
|
+
JnImageView: {
|
|
30
|
+
noDisplay: string;
|
|
31
|
+
};
|
|
32
|
+
JnPdfView: {
|
|
33
|
+
viewPDF: string;
|
|
34
|
+
downloadFile: string;
|
|
35
|
+
};
|
|
28
36
|
};
|
|
29
37
|
};
|
|
30
38
|
};
|
|
@@ -33,7 +33,7 @@ export declare const useAuthStore: import('pinia').StoreDefinition<"@jnrs/vue-co
|
|
|
33
33
|
workgroup?: string | undefined;
|
|
34
34
|
avatarFileName?: string | undefined;
|
|
35
35
|
} | null>;
|
|
36
|
-
dict: import('vue').Ref<
|
|
36
|
+
dict: import('vue').Ref<Dict | undefined, Dict | undefined>;
|
|
37
37
|
role: import('vue').Ref<{
|
|
38
38
|
[x: string]: unknown;
|
|
39
39
|
label: string;
|
|
@@ -74,7 +74,7 @@ export declare const useAuthStore: import('pinia').StoreDefinition<"@jnrs/vue-co
|
|
|
74
74
|
workgroup?: string | undefined;
|
|
75
75
|
avatarFileName?: string | undefined;
|
|
76
76
|
} | null>;
|
|
77
|
-
dict: import('vue').Ref<
|
|
77
|
+
dict: import('vue').Ref<Dict | undefined, Dict | undefined>;
|
|
78
78
|
role: import('vue').Ref<{
|
|
79
79
|
[x: string]: unknown;
|
|
80
80
|
label: string;
|
|
@@ -115,7 +115,7 @@ export declare const useAuthStore: import('pinia').StoreDefinition<"@jnrs/vue-co
|
|
|
115
115
|
workgroup?: string | undefined;
|
|
116
116
|
avatarFileName?: string | undefined;
|
|
117
117
|
} | null>;
|
|
118
|
-
dict: import('vue').Ref<
|
|
118
|
+
dict: import('vue').Ref<Dict | undefined, Dict | undefined>;
|
|
119
119
|
role: import('vue').Ref<{
|
|
120
120
|
[x: string]: unknown;
|
|
121
121
|
label: string;
|
package/dist/piniaStore/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "pinia-plugin-persistedstate";
|
|
2
|
-
import {
|
|
3
|
-
import { u, a } from "../index-CfK0PRAy.js";
|
|
2
|
+
import { a as t, c as r, u, b as a } from "../index-KdP2kDTZ.js";
|
|
4
3
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
t as useAuthStore,
|
|
5
|
+
r as useMenuStore,
|
|
6
|
+
u as useMockStore,
|
|
7
|
+
a as useSystemStore
|
|
8
8
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock仓库
|
|
3
|
+
* @returns isMock 是否使用mock数据
|
|
4
|
+
*/
|
|
5
|
+
export declare const useMockStore: import('pinia').StoreDefinition<"jnrs-app-mock", Pick<{
|
|
6
|
+
isMock: import('vue').Ref<boolean, boolean>;
|
|
7
|
+
}, "isMock">, Pick<{
|
|
8
|
+
isMock: import('vue').Ref<boolean, boolean>;
|
|
9
|
+
}, never>, Pick<{
|
|
10
|
+
isMock: import('vue').Ref<boolean, boolean>;
|
|
11
|
+
}, never>>;
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jnrs/vue-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "巨能前端工程化开发,Vue 专用核心功能包。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jnrs",
|
|
@@ -52,13 +52,14 @@
|
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@vueuse/core": "^14.1.0",
|
|
54
54
|
"element-plus": "^2.11.9",
|
|
55
|
+
"@element-plus/icons-vue": "^2.3.2",
|
|
55
56
|
"pinia": "^3.0.3",
|
|
56
57
|
"pinia-plugin-persistedstate": "^4.7.1",
|
|
57
58
|
"vue": "^3.5.22",
|
|
58
59
|
"vue-router": "^4.5.1",
|
|
59
60
|
"vue-i18n": "^9.14.5",
|
|
60
|
-
"@jnrs/shared": "1.1.
|
|
61
|
-
"@jnrs/core": "1.1.
|
|
61
|
+
"@jnrs/shared": "1.1.7",
|
|
62
|
+
"@jnrs/core": "1.1.7"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@vitejs/plugin-vue": "^6.0.1",
|
package/dist/index-CfK0PRAy.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import "pinia-plugin-persistedstate";
|
|
2
|
-
import { u as p } from "./system-KZETuQYC.js";
|
|
3
|
-
import { ref as c } from "vue";
|
|
4
|
-
import { defineStore as m } from "pinia";
|
|
5
|
-
import { a as v } from "./index-Ci9uljtG.js";
|
|
6
|
-
const y = m(
|
|
7
|
-
"@jnrs/vue-core/pinia:auth",
|
|
8
|
-
() => {
|
|
9
|
-
const e = c(!1), t = c(null), u = c(null), o = c([]), l = c([]);
|
|
10
|
-
return {
|
|
11
|
-
hasAuthenticated: e,
|
|
12
|
-
token: t,
|
|
13
|
-
userInfo: u,
|
|
14
|
-
dict: o,
|
|
15
|
-
role: l,
|
|
16
|
-
setUserInfo: (r) => {
|
|
17
|
-
u.value = r;
|
|
18
|
-
},
|
|
19
|
-
setToken: (r) => {
|
|
20
|
-
t.value = r, e.value = !0;
|
|
21
|
-
},
|
|
22
|
-
setDict: (r) => {
|
|
23
|
-
o.value = r;
|
|
24
|
-
},
|
|
25
|
-
setRole: (r) => {
|
|
26
|
-
l.value = r;
|
|
27
|
-
},
|
|
28
|
-
clearAuth: () => {
|
|
29
|
-
t.value = null, u.value = null, o.value = [], l.value = [], e.value = !1;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
persist: {
|
|
35
|
-
pick: ["hasAuthenticated", "token", "userInfo", "dict"]
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
), n = [];
|
|
39
|
-
for (let e = 0; e < 256; ++e)
|
|
40
|
-
n.push((e + 256).toString(16).slice(1));
|
|
41
|
-
function h(e, t = 0) {
|
|
42
|
-
return (n[e[t + 0]] + n[e[t + 1]] + n[e[t + 2]] + n[e[t + 3]] + "-" + n[e[t + 4]] + n[e[t + 5]] + "-" + n[e[t + 6]] + n[e[t + 7]] + "-" + n[e[t + 8]] + n[e[t + 9]] + "-" + n[e[t + 10]] + n[e[t + 11]] + n[e[t + 12]] + n[e[t + 13]] + n[e[t + 14]] + n[e[t + 15]]).toLowerCase();
|
|
43
|
-
}
|
|
44
|
-
let i;
|
|
45
|
-
const g = new Uint8Array(16);
|
|
46
|
-
function f() {
|
|
47
|
-
if (!i) {
|
|
48
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
49
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
50
|
-
i = crypto.getRandomValues.bind(crypto);
|
|
51
|
-
}
|
|
52
|
-
return i(g);
|
|
53
|
-
}
|
|
54
|
-
const b = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), d = { randomUUID: b };
|
|
55
|
-
function U(e, t, u) {
|
|
56
|
-
e = e || {};
|
|
57
|
-
const o = e.random ?? e.rng?.() ?? f();
|
|
58
|
-
if (o.length < 16)
|
|
59
|
-
throw new Error("Random bytes length must be >= 16");
|
|
60
|
-
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, h(o);
|
|
61
|
-
}
|
|
62
|
-
function x(e, t, u) {
|
|
63
|
-
return d.randomUUID && !e ? d.randomUUID() : U(e);
|
|
64
|
-
}
|
|
65
|
-
const S = m(
|
|
66
|
-
"@jnrs/vue-core/pinia:menu",
|
|
67
|
-
() => {
|
|
68
|
-
const e = c(!1), t = c([]), u = async (a) => {
|
|
69
|
-
if (e.value)
|
|
70
|
-
return t.value;
|
|
71
|
-
o(a), t.value = a, e.value = !0;
|
|
72
|
-
try {
|
|
73
|
-
await v(t.value);
|
|
74
|
-
} catch (s) {
|
|
75
|
-
throw s;
|
|
76
|
-
}
|
|
77
|
-
return t.value;
|
|
78
|
-
}, o = (a) => {
|
|
79
|
-
for (const s of a)
|
|
80
|
-
s.meta.uuid = x(), s.children && o(s.children);
|
|
81
|
-
};
|
|
82
|
-
return { hasFetchedAsyncMenus: e, menus: t, asyncSetMenus: u, clearMenu: () => {
|
|
83
|
-
e.value = !1, t.value = [];
|
|
84
|
-
} };
|
|
85
|
-
}
|
|
86
|
-
// {
|
|
87
|
-
// persist: {
|
|
88
|
-
// pick: ['menus']
|
|
89
|
-
// }
|
|
90
|
-
// }
|
|
91
|
-
);
|
|
92
|
-
console.log(
|
|
93
|
-
"%c✨ 欢迎使用 @jnrs/vue-core/pinia",
|
|
94
|
-
'background: #42B883; color: #39495C; font-weight: bold; padding: 4px 8px; border-radius: 4px; font-family: "Helvetica Neue", sans-serif;'
|
|
95
|
-
);
|
|
96
|
-
const _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
97
|
-
__proto__: null,
|
|
98
|
-
useAuthStore: y,
|
|
99
|
-
useMenuStore: S,
|
|
100
|
-
useSystemStore: p
|
|
101
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
102
|
-
export {
|
|
103
|
-
S as a,
|
|
104
|
-
_ as i,
|
|
105
|
-
y as u
|
|
106
|
-
};
|
package/dist/system-KZETuQYC.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { ref as r, computed as v, watch as d } from "vue";
|
|
2
|
-
import { defineStore as g } from "pinia";
|
|
3
|
-
import { Fullscreen as h } from "@jnrs/shared";
|
|
4
|
-
import { usePreferredDark as b } from "@vueuse/core";
|
|
5
|
-
const O = [
|
|
6
|
-
{ value: "zhCn", label: "@jnrs/vue-core.components.GlobalSetting.languageOptions.zhCn" },
|
|
7
|
-
{ value: "en", label: "@jnrs/vue-core.components.GlobalSetting.languageOptions.en" }
|
|
8
|
-
], y = [
|
|
9
|
-
{ value: "auto", label: "@jnrs/vue-core.components.GlobalSetting.themeOptions.auto" },
|
|
10
|
-
{ value: "light", label: "@jnrs/vue-core.components.GlobalSetting.themeOptions.light" },
|
|
11
|
-
{ value: "dark", label: "@jnrs/vue-core.components.GlobalSetting.themeOptions.dark" }
|
|
12
|
-
], C = [
|
|
13
|
-
{ value: "oklch(0.6 0.19 41)", label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.jnrs" },
|
|
14
|
-
{
|
|
15
|
-
value: "oklch(0.51 0.21 264)",
|
|
16
|
-
label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.azure"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
value: "oklch(0.90 0.16 98)",
|
|
20
|
-
label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.moonYellow"
|
|
21
|
-
},
|
|
22
|
-
{ value: "oklch(0.63 0.25 27)", label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.jdRed" },
|
|
23
|
-
{
|
|
24
|
-
value: "oklch(0.65 0.24 33)",
|
|
25
|
-
label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.taobaoRed"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
value: "oklch(0.61 0.20 261)",
|
|
29
|
-
label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.dingtalkBlue"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
value: "oklch(0.70 0.12 152)",
|
|
33
|
-
label: "@jnrs/vue-core.components.GlobalSetting.primaryColorOptions.wechatGreen"
|
|
34
|
-
}
|
|
35
|
-
];
|
|
36
|
-
function f(e) {
|
|
37
|
-
return e === "zhCn" || e === "en";
|
|
38
|
-
}
|
|
39
|
-
function S(e) {
|
|
40
|
-
return e === "light" || e === "dark" || e === "auto";
|
|
41
|
-
}
|
|
42
|
-
function j(e) {
|
|
43
|
-
return typeof e == "string" && e.trim() !== "";
|
|
44
|
-
}
|
|
45
|
-
const z = g(
|
|
46
|
-
"@jnrs/vue-core/pinia:system",
|
|
47
|
-
() => {
|
|
48
|
-
const e = r(!1), c = () => e.value = !e.value, n = new h(), a = r(!1), u = async () => {
|
|
49
|
-
await n.toggle(), a.value = n.isFullscreen();
|
|
50
|
-
}, l = r({
|
|
51
|
-
locale: O[0].value,
|
|
52
|
-
mode: y[0].value,
|
|
53
|
-
primaryColor: C[0].value
|
|
54
|
-
}), m = v(() => l.value.mode === "auto" ? s.value ? "dark" : "light" : l.value.mode), s = b();
|
|
55
|
-
return d(
|
|
56
|
-
[() => l.value.mode, s, () => l.value.primaryColor],
|
|
57
|
-
([o, p, i]) => {
|
|
58
|
-
const t = document.documentElement;
|
|
59
|
-
t.classList.remove("light", "dark"), o === "auto" ? t.classList.add(p ? "dark" : "light") : t.classList.add(o), i ? t.style.setProperty("--jnrs-color-primary", i) : t.style.removeProperty("--jnrs-color-primary");
|
|
60
|
-
},
|
|
61
|
-
{ immediate: !0 }
|
|
62
|
-
), {
|
|
63
|
-
theme: l,
|
|
64
|
-
computedThemeMode: m,
|
|
65
|
-
menuCollapse: e,
|
|
66
|
-
documentFullscreen: a,
|
|
67
|
-
toggleCollapse: c,
|
|
68
|
-
toggleFullScreen: u,
|
|
69
|
-
setLocale: (o) => {
|
|
70
|
-
f(o) && (l.value.locale = o);
|
|
71
|
-
},
|
|
72
|
-
setMode: (o) => {
|
|
73
|
-
S(o) && (l.value.mode = o);
|
|
74
|
-
},
|
|
75
|
-
setPrimaryColor: (o) => {
|
|
76
|
-
j(o) && (l.value.primaryColor = o);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
persist: {
|
|
82
|
-
pick: ["theme", "menuCollapse"]
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
export {
|
|
87
|
-
C,
|
|
88
|
-
O as L,
|
|
89
|
-
y as M,
|
|
90
|
-
z as u
|
|
91
|
-
};
|