@jnrs/vue-core 1.1.3 → 1.1.4

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 CHANGED
@@ -83,4 +83,8 @@ import { useAuthStore } from '@jnrs/vue-core/pinia'
83
83
 
84
84
  #### @jnrs/vue-core/components 模块
85
85
  Vue 组件
86
+ - GlobalSetting 全局偏好设置
87
+
88
+ #### @jnrs/vue-core/composables 模块
89
+ Vue 组合式 API
86
90
  - GlobalSetting 全局偏好设置
@@ -1,122 +1,93 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".globalSetting_item[data-v-122c674a]{margin-bottom:20px}.globalSetting_header{margin-bottom:0;padding-bottom:20px;border-bottom:1px solid #e4e4e7}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { defineComponent as g, ref as y, createBlock as d, openBlock as n, unref as t, withCtx as s, createElementBlock as i, Fragment as h, renderList as m, createElementVNode as k, createVNode as S, toDisplayString as b, createTextVNode as C } from "vue";
3
- import { ElDrawer as x, ElRadioGroup as E, ElRadio as V } from "element-plus";
4
- import { u as w } from "../system-DSegwP0Z.js";
5
- const N = /* @__PURE__ */ g({
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".globalSetting_item[data-v-b18e046e]{margin-bottom:20px}.globalSetting_header{margin-bottom:0;padding-bottom:20px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ import { defineComponent as c, ref as h, createBlock as r, openBlock as a, unref as l, withCtx as n, createElementVNode as u, createVNode as _, createElementBlock as g, Fragment as f, renderList as C, createTextVNode as V, toDisplayString as S } from "vue";
3
+ import { ElDrawer as k, ElRadioGroup as p, ElRadio as b } from "element-plus";
4
+ import { u as E, L as x, M as y, C as L } from "../system-C18uA6p7.js";
5
+ const N = { class: "globalSetting_item" }, w = { class: "globalSetting_item" }, I = { class: "globalSetting_item" }, T = /* @__PURE__ */ c({
6
6
  __name: "GlobalSetting",
7
- setup(u, { expose: r }) {
8
- const { theme: a, setTheme: c } = w(), l = y(!1), _ = [
9
- {
10
- title: "语言",
11
- key: "locale",
12
- select: [
13
- {
14
- value: "zhCn",
15
- label: "中文"
16
- },
17
- {
18
- value: "en",
19
- label: "English"
20
- }
21
- ]
22
- },
23
- {
24
- title: "主题",
25
- key: "mode",
26
- select: [
27
- {
28
- value: "light",
29
- label: "浅色"
30
- },
31
- {
32
- value: "dark",
33
- label: "深色"
34
- },
35
- {
36
- value: "auto",
37
- label: "跟随系统"
38
- }
39
- ]
40
- },
41
- {
42
- title: "强调色",
43
- key: "customColor",
44
- select: [
45
- {
46
- value: "oklch(0.6 0.19 41)",
47
- label: "JNRS"
48
- },
49
- {
50
- value: "oklch(0.51 0.21 264)",
51
- label: "蔚蓝"
52
- },
53
- {
54
- value: "oklch(0.90 0.16 98)",
55
- label: "月黄"
56
- },
57
- {
58
- value: "oklch(0.63 0.25 27)",
59
- label: "京东红"
60
- },
61
- {
62
- value: "oklch(0.65 0.24 33)",
63
- label: "淘宝红"
64
- },
65
- {
66
- value: "oklch(0.61 0.20 261)",
67
- label: "钉钉蓝"
68
- },
69
- {
70
- value: "oklch(0.70 0.12 152)",
71
- label: "微信绿"
72
- }
73
- ]
74
- }
75
- ];
76
- return r({
77
- handleShow: () => {
78
- l.value = !0;
79
- }
80
- }), (R, v) => (n(), d(t(x), {
7
+ setup(d, { expose: s }) {
8
+ const { theme: o, setLocale: m, setMode: i, setCustomColor: O } = E(), v = h(!1);
9
+ return s({ handleShow: () => {
10
+ v.value = !0;
11
+ } }), (D, t) => (a(), r(l(k), {
81
12
  "header-class": "globalSetting_header",
82
- modelValue: l.value,
83
- "onUpdate:modelValue": v[0] || (v[0] = (e) => l.value = e),
13
+ modelValue: v.value,
14
+ "onUpdate:modelValue": t[3] || (t[3] = (e) => v.value = e),
84
15
  title: "全局偏好设置"
85
16
  }, {
86
- default: s(() => [
87
- (n(), i(h, null, m(_, (e, p) => k("div", {
88
- class: "globalSetting_item",
89
- key: p
90
- }, [
91
- k("h4", null, b(e.title), 1),
92
- S(t(E), {
93
- "model-value": t(a)[e.key],
94
- onChange: (o) => t(c)(e.key, o)
17
+ default: n(() => [
18
+ u("div", N, [
19
+ t[4] || (t[4] = u("h4", null, "语言", -1)),
20
+ _(l(p), {
21
+ modelValue: l(o).locale,
22
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => l(o).locale = e),
23
+ onChange: l(m)
95
24
  }, {
96
- default: s(() => [
97
- (n(!0), i(h, null, m(e.select, (o, f) => (n(), d(t(V), {
98
- value: o.value,
99
- key: f
25
+ default: n(() => [
26
+ (a(!0), g(f, null, C(l(x), (e) => (a(), r(l(b), {
27
+ key: e.value,
28
+ value: e.value
100
29
  }, {
101
- default: s(() => [
102
- C(b(o.label), 1)
30
+ default: n(() => [
31
+ V(S(e.label), 1)
103
32
  ]),
104
33
  _: 2
105
34
  }, 1032, ["value"]))), 128))
106
35
  ]),
107
- _: 2
108
- }, 1032, ["model-value", "onChange"])
109
- ])), 64))
36
+ _: 1
37
+ }, 8, ["modelValue", "onChange"])
38
+ ]),
39
+ u("div", w, [
40
+ t[5] || (t[5] = u("h4", null, "主题", -1)),
41
+ _(l(p), {
42
+ modelValue: l(o).mode,
43
+ "onUpdate:modelValue": t[1] || (t[1] = (e) => l(o).mode = e),
44
+ onChange: l(i)
45
+ }, {
46
+ default: n(() => [
47
+ (a(!0), g(f, null, C(l(y), (e) => (a(), r(l(b), {
48
+ key: e.value,
49
+ value: e.value
50
+ }, {
51
+ default: n(() => [
52
+ V(S(e.label), 1)
53
+ ]),
54
+ _: 2
55
+ }, 1032, ["value"]))), 128))
56
+ ]),
57
+ _: 1
58
+ }, 8, ["modelValue", "onChange"])
59
+ ]),
60
+ u("div", I, [
61
+ t[6] || (t[6] = u("h4", null, "强调色", -1)),
62
+ _(l(p), {
63
+ modelValue: l(o).customColor,
64
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => l(o).customColor = e),
65
+ onChange: l(O)
66
+ }, {
67
+ default: n(() => [
68
+ (a(!0), g(f, null, C(l(L), (e) => (a(), r(l(b), {
69
+ key: e.value,
70
+ value: e.value
71
+ }, {
72
+ default: n(() => [
73
+ V(S(e.label), 1)
74
+ ]),
75
+ _: 2
76
+ }, 1032, ["value"]))), 128))
77
+ ]),
78
+ _: 1
79
+ }, 8, ["modelValue", "onChange"])
80
+ ])
110
81
  ]),
111
82
  _: 1
112
83
  }, 8, ["modelValue"]));
113
84
  }
114
- }), B = (u, r) => {
115
- const a = u.__vccOpts || u;
116
- for (const [c, l] of r)
117
- a[c] = l;
118
- return a;
119
- }, F = /* @__PURE__ */ B(N, [["__scopeId", "data-v-122c674a"]]);
85
+ }), U = (d, s) => {
86
+ const o = d.__vccOpts || d;
87
+ for (const [m, i] of s)
88
+ o[m] = i;
89
+ return o;
90
+ }, R = /* @__PURE__ */ U(T, [["__scopeId", "data-v-b18e046e"]]);
120
91
  export {
121
- F as GlobalSetting
92
+ R as GlobalSetting
122
93
  };
@@ -0,0 +1 @@
1
+ export { useAsyncTableHeight } from './useAsyncTableHeight';
@@ -0,0 +1,124 @@
1
+ import { ref as M, onMounted as N, onUnmounted as P } from "vue";
2
+ var R = typeof global == "object" && global && global.Object === Object && global, B = typeof self == "object" && self && self.Object === Object && self, k = R || B || Function("return this")(), T = k.Symbol, L = Object.prototype, F = L.hasOwnProperty, U = L.toString, m = T ? T.toStringTag : void 0;
3
+ function z(e) {
4
+ var n = F.call(e, m), i = e[m];
5
+ try {
6
+ e[m] = void 0;
7
+ var o = !0;
8
+ } catch {
9
+ }
10
+ var a = U.call(e);
11
+ return o && (n ? e[m] = i : delete e[m]), a;
12
+ }
13
+ var G = Object.prototype, _ = G.toString;
14
+ function q(e) {
15
+ return _.call(e);
16
+ }
17
+ var D = "[object Null]", X = "[object Undefined]", E = T ? T.toStringTag : void 0;
18
+ function J(e) {
19
+ return e == null ? e === void 0 ? X : D : E && E in Object(e) ? z(e) : q(e);
20
+ }
21
+ function K(e) {
22
+ return e != null && typeof e == "object";
23
+ }
24
+ var Q = "[object Symbol]";
25
+ function V(e) {
26
+ return typeof e == "symbol" || K(e) && J(e) == Q;
27
+ }
28
+ var Y = /\s/;
29
+ function Z(e) {
30
+ for (var n = e.length; n-- && Y.test(e.charAt(n)); )
31
+ ;
32
+ return n;
33
+ }
34
+ var ee = /^\s+/;
35
+ function ne(e) {
36
+ return e && e.slice(0, Z(e) + 1).replace(ee, "");
37
+ }
38
+ function v(e) {
39
+ var n = typeof e;
40
+ return e != null && (n == "object" || n == "function");
41
+ }
42
+ var w = NaN, te = /^[-+]0x[0-9a-f]+$/i, re = /^0b[01]+$/i, ie = /^0o[0-7]+$/i, oe = parseInt;
43
+ function $(e) {
44
+ if (typeof e == "number")
45
+ return e;
46
+ if (V(e))
47
+ return w;
48
+ if (v(e)) {
49
+ var n = typeof e.valueOf == "function" ? e.valueOf() : e;
50
+ e = v(n) ? n + "" : n;
51
+ }
52
+ if (typeof e != "string")
53
+ return e === 0 ? e : +e;
54
+ e = ne(e);
55
+ var i = re.test(e);
56
+ return i || ie.test(e) ? oe(e.slice(2), i ? 2 : 8) : te.test(e) ? w : +e;
57
+ }
58
+ var j = function() {
59
+ return k.Date.now();
60
+ }, ae = "Expected a function", ce = Math.max, fe = Math.min;
61
+ function ue(e, n, i) {
62
+ var o, a, f, u, r, c, s = 0, S = !1, l = !1, y = !0;
63
+ if (typeof e != "function")
64
+ throw new TypeError(ae);
65
+ n = $(n) || 0, v(i) && (S = !!i.leading, l = "maxWait" in i, f = l ? ce($(i.maxWait) || 0, n) : f, y = "trailing" in i ? !!i.trailing : y);
66
+ function p(t) {
67
+ var d = o, g = a;
68
+ return o = a = void 0, s = t, u = e.apply(g, d), u;
69
+ }
70
+ function H(t) {
71
+ return s = t, r = setTimeout(b, n), S ? p(t) : u;
72
+ }
73
+ function W(t) {
74
+ var d = t - c, g = t - s, I = n - d;
75
+ return l ? fe(I, f - g) : I;
76
+ }
77
+ function O(t) {
78
+ var d = t - c, g = t - s;
79
+ return c === void 0 || d >= n || d < 0 || l && g >= f;
80
+ }
81
+ function b() {
82
+ var t = j();
83
+ if (O(t))
84
+ return x(t);
85
+ r = setTimeout(b, W(t));
86
+ }
87
+ function x(t) {
88
+ return r = void 0, y && o ? p(t) : (o = a = void 0, u);
89
+ }
90
+ function A() {
91
+ r !== void 0 && clearTimeout(r), s = 0, o = c = a = r = void 0;
92
+ }
93
+ function C() {
94
+ return r === void 0 ? u : x(j());
95
+ }
96
+ function h() {
97
+ var t = j(), d = O(t);
98
+ if (o = arguments, a = this, c = t, d) {
99
+ if (r === void 0)
100
+ return H(c);
101
+ if (l)
102
+ return clearTimeout(r), r = setTimeout(b, n), p(c);
103
+ }
104
+ return r === void 0 && (r = setTimeout(b, n)), u;
105
+ }
106
+ return h.cancel = A, h.flush = C, h;
107
+ }
108
+ const de = (e = "el-table", n = 36, i = 40) => {
109
+ const o = M(500), a = ue(() => {
110
+ const f = document.querySelector(`.${e}`);
111
+ if (f) {
112
+ const u = f.getBoundingClientRect(), r = window.innerHeight, c = u.top + n + i, s = r - c;
113
+ o.value = s > 100 ? s : 100;
114
+ }
115
+ }, 300);
116
+ return N(() => {
117
+ a(), window.addEventListener("resize", a);
118
+ }), P(() => {
119
+ window.removeEventListener("resize", a);
120
+ }), { maxHeight: o };
121
+ };
122
+ export {
123
+ de as useAsyncTableHeight
124
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @Author : TanRui
3
+ * @WeChat : Tan578853789
4
+ * @File : useAsyncTableHeight.ts
5
+ * @Date : 2025/12/09
6
+ * @Desc. : 根据视口动态计算表格高度
7
+ */
8
+ /**
9
+ * @param {*} className 表格类名,默认值 el-table,如果页面存在多个表格,则必须分别传入自定义类名
10
+ * @param {*} FOOT_HEIGHT 总底部高度
11
+ * @param {*} PADDING_HEIGHT 总边距
12
+ */
13
+ export declare const useAsyncTableHeight: (className?: string, FOOT_HEIGHT?: number, PADDING_HEIGHT?: number) => {
14
+ maxHeight: import('vue').Ref<number, number>;
15
+ };
@@ -0,0 +1,48 @@
1
+ /**
2
+ * 语言选项
3
+ */
4
+ export declare const LOCALE_OPTIONS: readonly [{
5
+ readonly value: "zhCn";
6
+ readonly label: "中文";
7
+ }, {
8
+ readonly value: "en";
9
+ readonly label: "English";
10
+ }];
11
+ /**
12
+ * 主题模式选项
13
+ */
14
+ export declare const MODE_OPTIONS: readonly [{
15
+ readonly value: "auto";
16
+ readonly label: "跟随系统";
17
+ }, {
18
+ readonly value: "light";
19
+ readonly label: "浅色";
20
+ }, {
21
+ readonly value: "dark";
22
+ readonly label: "深色";
23
+ }];
24
+ /**
25
+ * 强调色选项
26
+ */
27
+ export declare const COLOR_OPTIONS: readonly [{
28
+ readonly value: "oklch(0.6 0.19 41)";
29
+ readonly label: "JNRS";
30
+ }, {
31
+ readonly value: "oklch(0.51 0.21 264)";
32
+ readonly label: "蔚蓝";
33
+ }, {
34
+ readonly value: "oklch(0.90 0.16 98)";
35
+ readonly label: "月黄";
36
+ }, {
37
+ readonly value: "oklch(0.63 0.25 27)";
38
+ readonly label: "京东红";
39
+ }, {
40
+ readonly value: "oklch(0.65 0.24 33)";
41
+ readonly label: "淘宝红";
42
+ }, {
43
+ readonly value: "oklch(0.61 0.20 261)";
44
+ readonly label: "钉钉蓝";
45
+ }, {
46
+ readonly value: "oklch(0.70 0.12 152)";
47
+ readonly label: "微信绿";
48
+ }];
@@ -1,22 +1,28 @@
1
1
  import "pinia-plugin-persistedstate";
2
- import { u as m } from "./system-DSegwP0Z.js";
3
- import { ref as i } from "vue";
4
- import { defineStore as l } from "pinia";
2
+ import { u as m } from "./system-C18uA6p7.js";
3
+ import { ref as s } from "vue";
4
+ import { defineStore as d } from "pinia";
5
5
  import { a as p } from "./index-DEkMXVh9.js";
6
- const y = l(
6
+ const y = d(
7
7
  "@jnrs/vue-core/pinia:auth",
8
8
  () => {
9
- const e = i(!1), n = i(), u = i(), o = i();
9
+ const e = s(!1), n = s(null), u = s(null), o = s(null);
10
10
  return {
11
11
  hasAuthenticated: e,
12
12
  token: n,
13
13
  userInfo: u,
14
14
  dict: o,
15
- asyncSetAuth: async (c) => {
16
- e.value = !0, c.token && (n.value = c.token), c.userInfo && (u.value = c.userInfo), c.dict && (o.value = c.dict);
15
+ setUserInfo: (a) => {
16
+ u.value = a;
17
+ },
18
+ setToken: (a) => {
19
+ n.value = a, e.value = !0;
20
+ },
21
+ setDict: (a) => {
22
+ o.value = a;
17
23
  },
18
24
  asyncClearAuth: async () => {
19
- e.value = !1, n.value = void 0, u.value = void 0, o.value = void 0;
25
+ n.value = null, u.value = null, o.value = null, e.value = !1;
20
26
  }
21
27
  };
22
28
  },
@@ -31,43 +37,43 @@ for (let e = 0; e < 256; ++e)
31
37
  function v(e, n = 0) {
32
38
  return (t[e[n + 0]] + t[e[n + 1]] + t[e[n + 2]] + t[e[n + 3]] + "-" + t[e[n + 4]] + t[e[n + 5]] + "-" + t[e[n + 6]] + t[e[n + 7]] + "-" + t[e[n + 8]] + t[e[n + 9]] + "-" + t[e[n + 10]] + t[e[n + 11]] + t[e[n + 12]] + t[e[n + 13]] + t[e[n + 14]] + t[e[n + 15]]).toLowerCase();
33
39
  }
34
- let a;
40
+ let i;
35
41
  const h = new Uint8Array(16);
36
- function f() {
37
- if (!a) {
42
+ function g() {
43
+ if (!i) {
38
44
  if (typeof crypto > "u" || !crypto.getRandomValues)
39
45
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
40
- a = crypto.getRandomValues.bind(crypto);
46
+ i = crypto.getRandomValues.bind(crypto);
41
47
  }
42
- return a(h);
48
+ return i(h);
43
49
  }
44
- const g = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), d = { randomUUID: g };
50
+ const f = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), l = { randomUUID: f };
45
51
  function b(e, n, u) {
46
52
  e = e || {};
47
- const o = e.random ?? e.rng?.() ?? f();
53
+ const o = e.random ?? e.rng?.() ?? g();
48
54
  if (o.length < 16)
49
55
  throw new Error("Random bytes length must be >= 16");
50
56
  return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, v(o);
51
57
  }
52
- function S(e, n, u) {
53
- return d.randomUUID && !e ? d.randomUUID() : b(e);
58
+ function U(e, n, u) {
59
+ return l.randomUUID && !e ? l.randomUUID() : b(e);
54
60
  }
55
- const U = l(
61
+ const x = d(
56
62
  "@jnrs/vue-core/pinia:menu",
57
63
  () => {
58
- const e = i(!1), n = i([]), u = async (s) => {
64
+ const e = s(!1), n = s([]), u = async (c) => {
59
65
  if (e.value)
60
66
  return n.value;
61
- o(s), n.value = s, e.value = !0;
67
+ o(c), n.value = c, e.value = !0;
62
68
  try {
63
69
  await p(n.value);
64
70
  } catch (r) {
65
71
  throw r;
66
72
  }
67
73
  return n.value;
68
- }, o = (s) => {
69
- for (const r of s)
70
- r.meta.uuid = S(), r.children && o(r.children);
74
+ }, o = (c) => {
75
+ for (const r of c)
76
+ r.meta.uuid = U(), r.children && o(r.children);
71
77
  };
72
78
  return { hasFetchedAsyncMenus: e, menus: n, asyncSetMenus: u };
73
79
  }
@@ -81,14 +87,14 @@ console.log(
81
87
  "%c✨ 欢迎使用 @jnrs/vue-core/pinia",
82
88
  'background: #42B883; color: #39495C; font-weight: bold; padding: 4px 8px; border-radius: 4px; font-family: "Helvetica Neue", sans-serif;'
83
89
  );
84
- const k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
90
+ const R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
85
91
  __proto__: null,
86
92
  useAuthStore: y,
87
- useMenuStore: U,
93
+ useMenuStore: x,
88
94
  useSystemStore: m
89
95
  }, Symbol.toStringTag, { value: "Module" }));
90
96
  export {
91
- U as a,
92
- k as i,
97
+ x as a,
98
+ R as i,
93
99
  y as u
94
100
  };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { c as r } from "./index-DEkMXVh9.js";
2
- import { i } from "./index-pLO4r50y.js";
2
+ import { i } from "./index-BEHnZZvl.js";
3
3
  console.log(
4
4
  "%c✨ 欢迎使用 @jnrs/vue-core",
5
5
  'background: #42B883; color: #39495C; font-weight: bold; padding: 4px 8px; border-radius: 4px; font-family: "Helvetica Neue", sans-serif;'
@@ -0,0 +1,4 @@
1
+ import { Locale, ThemeMode } from '@jnrs/shared';
2
+ export declare function isLocale(value: unknown): value is Locale;
3
+ export declare function isThemeMode(value: unknown): value is ThemeMode;
4
+ export declare function isValidColor(value: unknown): value is string;
@@ -1,13 +1,8 @@
1
1
  import { Dict, User } from '@jnrs/shared';
2
- interface Auth {
3
- token: string;
4
- userInfo: User;
5
- dict: Dict;
6
- }
7
2
  /**
8
3
  * useAuthStore 权限仓库
9
- * @returns hasAuthenticated 是否已登录
10
- * @returns token 登录凭证
4
+ * @returns hasAuthenticated 是否已身份验证
5
+ * @returns token 身份验证凭证
11
6
  * @returns userInfo 用户信息
12
7
  * @returns dict 字典
13
8
  * @methods asyncSetAuth 设置权限信息
@@ -15,24 +10,89 @@ interface Auth {
15
10
  */
16
11
  export declare const useAuthStore: import('pinia').StoreDefinition<"@jnrs/vue-core/pinia:auth", Pick<{
17
12
  hasAuthenticated: import('vue').Ref<boolean, boolean>;
18
- token: import('vue').Ref<string | undefined, string | undefined>;
19
- userInfo: import('vue').Ref<any, any>;
20
- dict: import('vue').Ref<Dict | undefined, Dict | undefined>;
21
- asyncSetAuth: (data: Auth) => Promise<void>;
13
+ token: import('vue').Ref<string | null, string | null>;
14
+ userInfo: import('vue').Ref<{
15
+ [x: string]: unknown;
16
+ id: number;
17
+ name: string;
18
+ role: number;
19
+ permissions?: string[] | undefined;
20
+ jobTitle?: number | undefined;
21
+ workNo?: string | undefined;
22
+ workgroup?: string | undefined;
23
+ avatarFileName?: string | undefined;
24
+ } | null, User | {
25
+ [x: string]: unknown;
26
+ id: number;
27
+ name: string;
28
+ role: number;
29
+ permissions?: string[] | undefined;
30
+ jobTitle?: number | undefined;
31
+ workNo?: string | undefined;
32
+ workgroup?: string | undefined;
33
+ avatarFileName?: string | undefined;
34
+ } | null>;
35
+ dict: import('vue').Ref<Dict | null, Dict | null>;
36
+ setUserInfo: (d: User) => void;
37
+ setToken: (d: string) => void;
38
+ setDict: (d: Dict) => void;
22
39
  asyncClearAuth: () => Promise<void>;
23
40
  }, "hasAuthenticated" | "token" | "userInfo" | "dict">, Pick<{
24
41
  hasAuthenticated: import('vue').Ref<boolean, boolean>;
25
- token: import('vue').Ref<string | undefined, string | undefined>;
26
- userInfo: import('vue').Ref<any, any>;
27
- dict: import('vue').Ref<Dict | undefined, Dict | undefined>;
28
- asyncSetAuth: (data: Auth) => Promise<void>;
42
+ token: import('vue').Ref<string | null, string | null>;
43
+ userInfo: import('vue').Ref<{
44
+ [x: string]: unknown;
45
+ id: number;
46
+ name: string;
47
+ role: number;
48
+ permissions?: string[] | undefined;
49
+ jobTitle?: number | undefined;
50
+ workNo?: string | undefined;
51
+ workgroup?: string | undefined;
52
+ avatarFileName?: string | undefined;
53
+ } | null, User | {
54
+ [x: string]: unknown;
55
+ id: number;
56
+ name: string;
57
+ role: number;
58
+ permissions?: string[] | undefined;
59
+ jobTitle?: number | undefined;
60
+ workNo?: string | undefined;
61
+ workgroup?: string | undefined;
62
+ avatarFileName?: string | undefined;
63
+ } | null>;
64
+ dict: import('vue').Ref<Dict | null, Dict | null>;
65
+ setUserInfo: (d: User) => void;
66
+ setToken: (d: string) => void;
67
+ setDict: (d: Dict) => void;
29
68
  asyncClearAuth: () => Promise<void>;
30
69
  }, never>, Pick<{
31
70
  hasAuthenticated: import('vue').Ref<boolean, boolean>;
32
- token: import('vue').Ref<string | undefined, string | undefined>;
33
- userInfo: import('vue').Ref<any, any>;
34
- dict: import('vue').Ref<Dict | undefined, Dict | undefined>;
35
- asyncSetAuth: (data: Auth) => Promise<void>;
71
+ token: import('vue').Ref<string | null, string | null>;
72
+ userInfo: import('vue').Ref<{
73
+ [x: string]: unknown;
74
+ id: number;
75
+ name: string;
76
+ role: number;
77
+ permissions?: string[] | undefined;
78
+ jobTitle?: number | undefined;
79
+ workNo?: string | undefined;
80
+ workgroup?: string | undefined;
81
+ avatarFileName?: string | undefined;
82
+ } | null, User | {
83
+ [x: string]: unknown;
84
+ id: number;
85
+ name: string;
86
+ role: number;
87
+ permissions?: string[] | undefined;
88
+ jobTitle?: number | undefined;
89
+ workNo?: string | undefined;
90
+ workgroup?: string | undefined;
91
+ avatarFileName?: string | undefined;
92
+ } | null>;
93
+ dict: import('vue').Ref<Dict | null, Dict | null>;
94
+ setUserInfo: (d: User) => void;
95
+ setToken: (d: string) => void;
96
+ setDict: (d: Dict) => void;
36
97
  asyncClearAuth: () => Promise<void>;
37
- }, "asyncSetAuth" | "asyncClearAuth">>;
38
- export {};
98
+ }, "setUserInfo" | "setToken" | "setDict" | "asyncClearAuth">>;