yahee-components 0.0.75 → 0.0.81
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/es/annex-upload/annex-upload.vue.js +51 -154
- package/es/annex-upload/annex-upload.vue2.js +119 -2
- package/es/annex-upload/index.js +3 -3
- package/es/api/server.js +24 -19
- package/es/api/tool.js +31 -28
- package/es/border-wrap/border-wrap.vue.js +64 -95
- package/es/border-wrap/border-wrap.vue2.js +46 -2
- package/es/common-import/common-import.vue.js +369 -640
- package/es/common-import/common-import.vue2.js +328 -2
- package/es/common-import/index.js +3 -3
- package/es/common-import/props.js +4 -1
- package/es/complex-search/complex-search.vue.js +15 -15
- package/es/copy/copy.vue.js +37 -55
- package/es/copy/copy.vue2.js +34 -2
- package/es/copy/index.js +3 -3
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +114 -213
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +125 -2
- package/es/drop-down-condition/drop-down-condition.vue.js +113 -213
- package/es/drop-down-condition/drop-down-condition.vue2.js +127 -2
- package/es/echart-gauge/echart-gauge.vue.js +12 -140
- package/es/echart-gauge/echart-gauge.vue2.js +147 -2
- package/es/echart-gauge/index.js +3 -3
- package/es/image-upload/image-upload.vue.js +109 -170
- package/es/image-upload/image-upload.vue2.js +91 -2
- package/es/image-upload/index.js +3 -3
- package/es/input/index.js +3 -3
- package/es/input/input.vue.js +17 -38
- package/es/input/input.vue2.js +33 -2
- package/es/left-condition/index.js +3 -3
- package/es/left-condition/left-condition-sub.vue.js +32 -91
- package/es/left-condition/left-condition-sub.vue2.js +76 -2
- package/es/left-condition/left-condition.vue.js +70 -218
- package/es/left-condition/left-condition.vue2.js +160 -2
- package/es/left-condition-enum/index.js +3 -3
- package/es/left-condition-enum/left-condition-enum.vue.js +20 -49
- package/es/left-condition-enum/left-condition-enum.vue2.js +40 -2
- package/es/operation-log/operation-log-content.vue.js +71 -92
- package/es/operation-log/operation-log-content.vue2.js +39 -2
- package/es/operation-log/operation-log-dialog.vue.js +46 -68
- package/es/operation-log/operation-log-dialog.vue2.js +38 -2
- package/es/operation-log/operation-log-form.vue.js +108 -183
- package/es/operation-log/operation-log-form.vue2.js +104 -2
- package/es/operation-log/operation-log.vue.js +119 -228
- package/es/operation-log/operation-log.vue2.js +135 -2
- package/es/packages/components/api/log-server.js +6 -6
- package/es/packages/components/api/server.js +18 -20
- package/es/packages/components/api/tool.js +35 -32
- package/es/packages/components/api/upload-server.js +1 -1
- package/es/packages/components/hooks/useEcharts.js +19 -19
- package/es/packages/components/hooks/useImg.js +8 -8
- package/es/scale-screen/index.js +4 -4
- package/es/scale-screen/scale-screen.vue.js +19 -126
- package/es/scale-screen/scale-screen.vue2.js +125 -2
- package/es/utils/translate.js +21 -21
- package/package.json +46 -46
- package/readme.md +249 -249
- package/types/src/common-import/common-import.vue.d.ts +10 -0
- package/types/src/common-import/index.d.ts +25 -0
- package/types/src/common-import/props.d.ts +19 -0
- package/types/src/installs.d.ts +25 -0
- package/types/src/left-condition-enum/left-condition-enum.d.ts +3 -0
- package/es/packages/components/api/common/index.js +0 -7
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ElMessage as
|
|
1
|
+
import { ElMessage as t } from "element-plus";
|
|
2
2
|
import "element-plus/theme-chalk/src/base.scss";
|
|
3
3
|
import "element-plus/theme-chalk/src/badge.scss";
|
|
4
4
|
import "element-plus/theme-chalk/src/message.scss";
|
|
5
|
-
import { AxiosHeaders as
|
|
6
|
-
const
|
|
7
|
-
...
|
|
5
|
+
import { AxiosHeaders as o } from "../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js";
|
|
6
|
+
const s = (r) => ({
|
|
7
|
+
...r,
|
|
8
8
|
timeout: 2e4
|
|
9
|
-
}),
|
|
10
|
-
const
|
|
9
|
+
}), d = (r) => {
|
|
10
|
+
const e = new o(r.headers);
|
|
11
11
|
return {
|
|
12
|
-
...
|
|
13
|
-
headers:
|
|
12
|
+
...r,
|
|
13
|
+
headers: e
|
|
14
14
|
};
|
|
15
|
-
},
|
|
16
|
-
const
|
|
15
|
+
}, l = (r) => {
|
|
16
|
+
const e = {
|
|
17
17
|
400: "错误的请求",
|
|
18
18
|
// token 失效
|
|
19
19
|
401: "未授权,请重新登录",
|
|
@@ -28,29 +28,32 @@ const p = (e) => ({
|
|
|
28
28
|
504: "网络超时",
|
|
29
29
|
505: "http版本不支持该请求"
|
|
30
30
|
};
|
|
31
|
-
if (
|
|
32
|
-
|
|
31
|
+
if (r) {
|
|
32
|
+
t.error(e[r] ?? `其他连接错误 --${r}`);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
35
|
+
t.error("无法连接到服务器!");
|
|
36
|
+
}, p = (r) => {
|
|
37
|
+
if (!r || r === 0)
|
|
38
|
+
return !0;
|
|
39
|
+
const e = {
|
|
40
|
+
10031: "登录失效,需要重新登录",
|
|
41
|
+
// token 失效
|
|
42
|
+
10032: "您太久没登录,请重新登录~",
|
|
43
|
+
// token 过期
|
|
44
|
+
10033: "账户未绑定角色,请联系管理员绑定角色",
|
|
45
|
+
10034: "该用户未注册,请联系管理员注册用户",
|
|
46
|
+
10035: "code 无法获取对应第三方平台用户",
|
|
47
|
+
10036: "该账户未关联员工,请联系管理员做关联",
|
|
48
|
+
10037: "账号已无效",
|
|
49
|
+
10038: "账号未找到"
|
|
50
|
+
};
|
|
51
|
+
return r in e ? (t.error(e[r]), !1) : !0;
|
|
52
|
+
}, c = (r, e) => r !== 0 && e && e.trim() && e !== "OK" ? (t.error(e), !1) : !0;
|
|
50
53
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
p as handleAuthError,
|
|
55
|
+
s as handleChangeRequestHeader,
|
|
56
|
+
d as handleConfigureAuth,
|
|
57
|
+
c as handleGeneralError,
|
|
58
|
+
l as handleNetworkError
|
|
56
59
|
};
|
|
@@ -7,7 +7,7 @@ import "element-plus/theme-chalk/src/button.scss";
|
|
|
7
7
|
import "element-plus/theme-chalk/src/input.scss";
|
|
8
8
|
import "element-plus/theme-chalk/src/overlay.scss";
|
|
9
9
|
import m from "../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js";
|
|
10
|
-
const u = "
|
|
10
|
+
const u = "http://api-tools-test.yahee.com.cn:81/", s = m.create({
|
|
11
11
|
baseURL: u,
|
|
12
12
|
timeout: 3e4,
|
|
13
13
|
withCredentials: !0
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useResizeObserver as
|
|
1
|
+
import { useResizeObserver as w } from "../../../node_modules/.pnpm/@vueuse_core@11.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/core/index.js";
|
|
2
2
|
import "../../../node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/index.js";
|
|
3
|
-
import { ref as
|
|
4
|
-
import { init as
|
|
5
|
-
const J = function(s,
|
|
3
|
+
import { ref as C, onMounted as L, watch as R, onUnmounted as x } from "vue";
|
|
4
|
+
import { init as y } from "../../../node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/core/echarts.js";
|
|
5
|
+
const J = function(s, S, u) {
|
|
6
6
|
const {
|
|
7
|
-
resize:
|
|
7
|
+
resize: d = !0,
|
|
8
8
|
showLoading: r = !0,
|
|
9
9
|
loadingOption: c = {
|
|
10
10
|
text: "",
|
|
@@ -25,13 +25,13 @@ const J = function(s, y, S) {
|
|
|
25
25
|
fontSize: 14,
|
|
26
26
|
zlevel: 0
|
|
27
27
|
},
|
|
28
|
-
defaultOption:
|
|
29
|
-
theme:
|
|
30
|
-
} = {}, t =
|
|
28
|
+
defaultOption: p,
|
|
29
|
+
theme: h = "shine"
|
|
30
|
+
} = u || {}, t = C(p);
|
|
31
31
|
let e;
|
|
32
|
-
|
|
33
|
-
e =
|
|
34
|
-
}),
|
|
32
|
+
L(() => {
|
|
33
|
+
e = y(s.value, h), i(), t.value && (e.setOption(t.value), n());
|
|
34
|
+
}), R(t, () => {
|
|
35
35
|
e && (t.value && Object.keys(t.value).some((o) => /^[a-z]/.test(o)) ? t.value.series[0] && t.value.series[0].data && JSON.stringify(t.value.series[0].data) == "[]" ? i(f) : (e.setOption(t.value, !0), n()) : i());
|
|
36
36
|
});
|
|
37
37
|
function i(o = c) {
|
|
@@ -40,22 +40,22 @@ const J = function(s, y, S) {
|
|
|
40
40
|
function n() {
|
|
41
41
|
r && e.hideLoading();
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function v(o) {
|
|
44
44
|
t.value = o;
|
|
45
45
|
}
|
|
46
46
|
let a = () => {
|
|
47
47
|
};
|
|
48
|
-
if (
|
|
48
|
+
if (d) {
|
|
49
49
|
let o = !1;
|
|
50
|
-
const { stop:
|
|
51
|
-
const l =
|
|
52
|
-
|
|
50
|
+
const { stop: m } = w(s, (O) => {
|
|
51
|
+
const l = O[0], { width: g, height: z } = l.contentRect;
|
|
52
|
+
g && z && e && !o && (o = !0, e.resize(l.contentRect), o = !1);
|
|
53
53
|
});
|
|
54
|
-
a =
|
|
54
|
+
a = m;
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return x(() => {
|
|
57
57
|
a(), e == null || e.dispose();
|
|
58
|
-
}), { echartsOption: t, setOption:
|
|
58
|
+
}), { echartsOption: t, setOption: v, showCharLoading: i, hideCharLoading: n, noDataOption: f };
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
61
61
|
J as useEcharts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function
|
|
1
|
+
function s(e, c = !1) {
|
|
2
2
|
if (!e) return "";
|
|
3
3
|
const t = /_[BOSGM]/;
|
|
4
4
|
if (t.test(e)) {
|
|
5
|
-
let
|
|
6
|
-
return
|
|
7
|
-
} else return
|
|
5
|
+
let r = "";
|
|
6
|
+
return c ? r = e.replace(t, "_B") : r = e.replace(t, "_S"), `http://qas-service.yahee.com.cn:8088/FMSService/Latest/${r}`;
|
|
7
|
+
} else return c ? `http://qas-service.yahee.com.cn:8088/FMSService/Latest/${e}` : `http://qas-service.yahee.com.cn:8088/FMSService/Latest/Small/${e}`;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return e && e.fileId ? `
|
|
9
|
+
function a(e) {
|
|
10
|
+
return e && e.fileId ? `http://qas-service.yahee.com.cn:8088/FMSService/Latest/${e.fileId}` : "";
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
s as default,
|
|
14
|
+
a as useFile
|
|
15
15
|
};
|
package/es/scale-screen/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { withInstall as e } from "../utils/install.js";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
2
|
+
import r from "./scale-screen.vue.js";
|
|
3
|
+
const o = e(r);
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
o as YaheeScaleScreen,
|
|
6
|
+
o as default
|
|
7
7
|
};
|
|
@@ -1,130 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: !1
|
|
16
|
-
},
|
|
17
|
-
autoScale: {
|
|
18
|
-
type: [Object, Boolean],
|
|
19
|
-
default: !0
|
|
20
|
-
},
|
|
21
|
-
delay: {
|
|
22
|
-
type: Number,
|
|
23
|
-
default: 500
|
|
24
|
-
},
|
|
25
|
-
boxStyle: {
|
|
26
|
-
type: Object,
|
|
27
|
-
default: () => ({})
|
|
28
|
-
},
|
|
29
|
-
wrapperStyle: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default: () => ({})
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
setup(h) {
|
|
35
|
-
function W(i, l) {
|
|
36
|
-
let o;
|
|
37
|
-
return function(...a) {
|
|
38
|
-
o && clearTimeout(o), o = setTimeout(
|
|
39
|
-
() => {
|
|
40
|
-
typeof i == "function" && i.apply(null, a), clearTimeout(o);
|
|
41
|
-
},
|
|
42
|
-
l > 0 ? l : 100
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const n = h, e = k({
|
|
47
|
-
width: 0,
|
|
48
|
-
height: 0,
|
|
49
|
-
originalWidth: 0,
|
|
50
|
-
originalHeight: 0,
|
|
51
|
-
observer: null
|
|
52
|
-
}), g = {
|
|
53
|
-
box: {
|
|
54
|
-
overflow: "hidden",
|
|
55
|
-
backgroundSize: "100% 100%",
|
|
56
|
-
background: "#000",
|
|
57
|
-
width: "100vw",
|
|
58
|
-
height: "100vh"
|
|
59
|
-
},
|
|
60
|
-
wrapper: {
|
|
61
|
-
transitionProperty: "all",
|
|
62
|
-
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
63
|
-
transitionDuration: "500ms",
|
|
64
|
-
position: "relative",
|
|
65
|
-
overflow: "hidden",
|
|
66
|
-
zIndex: 100,
|
|
67
|
-
transformOrigin: "left top"
|
|
68
|
-
}
|
|
69
|
-
}, t = v(), d = v();
|
|
70
|
-
T(
|
|
71
|
-
() => n.autoScale,
|
|
72
|
-
async (i) => {
|
|
73
|
-
i ? (u(), w()) : (m(), H());
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
const f = () => new Promise((i) => {
|
|
77
|
-
d.value.scrollLeft = 0, d.value.scrollTop = 0, S(() => {
|
|
78
|
-
var l, o;
|
|
79
|
-
n.width && n.height ? (e.width = n.width, e.height = n.height) : (e.width = (l = t.value) == null ? void 0 : l.clientWidth, e.height = (o = t.value) == null ? void 0 : o.clientHeight), (!e.originalHeight || !e.originalWidth) && (e.originalWidth = window.screen.width, e.originalHeight = window.screen.height), i();
|
|
80
|
-
});
|
|
81
|
-
}), p = () => {
|
|
82
|
-
e.width && e.height ? (t.value.style.width = `${e.width}px`, t.value.style.height = `${e.height}px`) : (t.value.style.width = `${e.originalWidth}px`, t.value.style.height = `${e.originalHeight}px`);
|
|
83
|
-
}, H = () => {
|
|
84
|
-
t.value && (t.value.style.transform = "", t.value.style.margin = "");
|
|
85
|
-
}, $ = (i) => {
|
|
86
|
-
if (!n.autoScale)
|
|
87
|
-
return;
|
|
88
|
-
const l = t.value.clientWidth, o = t.value.clientHeight, a = document.body.clientWidth, c = document.body.clientHeight;
|
|
89
|
-
t.value.style.transform = `scale(${i},${i})`;
|
|
90
|
-
let r = Math.max((a - l * i) / 2, 0), s = Math.max((c - o * i) / 2, 0);
|
|
91
|
-
typeof n.autoScale == "object" && (!n.autoScale.x && (r = 0), !n.autoScale.y && (s = 0)), t.value.style.margin = `${s}px ${r}px`;
|
|
92
|
-
}, y = () => {
|
|
93
|
-
const i = document.body.clientWidth, l = document.body.clientHeight, o = e.width || e.originalWidth, a = e.height || e.originalHeight, c = i / +o, r = l / +a;
|
|
94
|
-
if (n.fullScreen)
|
|
95
|
-
return t.value.style.transform = `scale(${c},${r})`, !1;
|
|
96
|
-
const s = Math.min(c, r);
|
|
97
|
-
$(s);
|
|
98
|
-
}, u = W(async () => {
|
|
99
|
-
await f(), p(), y();
|
|
100
|
-
}, n.delay), m = () => {
|
|
101
|
-
window.removeEventListener("resize", u);
|
|
102
|
-
}, w = () => {
|
|
103
|
-
window.addEventListener("resize", u);
|
|
104
|
-
};
|
|
105
|
-
return L(() => {
|
|
106
|
-
S(async () => {
|
|
107
|
-
await f(), p(), y(), w();
|
|
108
|
-
});
|
|
109
|
-
}), _(() => {
|
|
110
|
-
m();
|
|
111
|
-
}), (i, l) => (B(), j("div", M, [
|
|
112
|
-
b("section", {
|
|
113
|
-
style: x({ ...g.box, ...h.boxStyle }),
|
|
114
|
-
ref_key: "box",
|
|
115
|
-
ref: d
|
|
1
|
+
import s from "./scale-screen.vue2.js";
|
|
2
|
+
import { createElementBlock as n, openBlock as l, createElementVNode as r, normalizeStyle as t, renderSlot as a } from "vue";
|
|
3
|
+
import m from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = { class: "yahee-scale-screen" };
|
|
5
|
+
function f(c, i, e, o, _, d) {
|
|
6
|
+
return l(), n("div", p, [
|
|
7
|
+
r("section", {
|
|
8
|
+
style: t({ ...o.styles.box, ...e.boxStyle }),
|
|
9
|
+
ref: "box"
|
|
10
|
+
}, [
|
|
11
|
+
r("div", {
|
|
12
|
+
style: t({ ...o.styles.wrapper, ...e.wrapperStyle }),
|
|
13
|
+
ref: "screenWrapper"
|
|
116
14
|
}, [
|
|
117
|
-
|
|
118
|
-
style: x({ ...g.wrapper, ...h.wrapperStyle }),
|
|
119
|
-
ref_key: "screenWrapper",
|
|
120
|
-
ref: t
|
|
121
|
-
}, [
|
|
122
|
-
E(i.$slots, "default")
|
|
123
|
-
], 4)
|
|
15
|
+
a(c.$slots, "default")
|
|
124
16
|
], 4)
|
|
125
|
-
])
|
|
126
|
-
|
|
127
|
-
}
|
|
17
|
+
], 4)
|
|
18
|
+
]);
|
|
19
|
+
}
|
|
20
|
+
const b = /* @__PURE__ */ m(s, [["render", f], ["__file", "D:/projects/frontend/common/common_componentsweb/packages/components/src/scale-screen/scale-screen.vue"]]);
|
|
128
21
|
export {
|
|
129
|
-
|
|
22
|
+
b as default
|
|
130
23
|
};
|
|
@@ -1,4 +1,127 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as z, reactive as O, ref as S, watch as M, onMounted as T, nextTick as x, onUnmounted as j } from "vue";
|
|
2
|
+
const k = /* @__PURE__ */ z({
|
|
3
|
+
__name: "scale-screen",
|
|
4
|
+
props: {
|
|
5
|
+
width: {
|
|
6
|
+
type: [String, Number],
|
|
7
|
+
default: 1920
|
|
8
|
+
},
|
|
9
|
+
height: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
default: 1080
|
|
12
|
+
},
|
|
13
|
+
fullScreen: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
autoScale: {
|
|
18
|
+
type: [Object, Boolean],
|
|
19
|
+
default: !0
|
|
20
|
+
},
|
|
21
|
+
delay: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 500
|
|
24
|
+
},
|
|
25
|
+
boxStyle: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: () => ({})
|
|
28
|
+
},
|
|
29
|
+
wrapperStyle: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => ({})
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup(W, { expose: H }) {
|
|
35
|
+
H();
|
|
36
|
+
function m(i, o) {
|
|
37
|
+
let r;
|
|
38
|
+
return function(...l) {
|
|
39
|
+
r && clearTimeout(r), r = setTimeout(
|
|
40
|
+
() => {
|
|
41
|
+
typeof i == "function" && i.apply(null, l), clearTimeout(r);
|
|
42
|
+
},
|
|
43
|
+
o > 0 ? o : 100
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const n = W, e = O({
|
|
48
|
+
width: 0,
|
|
49
|
+
height: 0,
|
|
50
|
+
originalWidth: 0,
|
|
51
|
+
originalHeight: 0,
|
|
52
|
+
observer: null
|
|
53
|
+
}), _ = {
|
|
54
|
+
box: {
|
|
55
|
+
overflow: "hidden",
|
|
56
|
+
backgroundSize: "100% 100%",
|
|
57
|
+
background: "#000",
|
|
58
|
+
width: "100vw",
|
|
59
|
+
height: "100vh"
|
|
60
|
+
},
|
|
61
|
+
wrapper: {
|
|
62
|
+
transitionProperty: "all",
|
|
63
|
+
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
64
|
+
transitionDuration: "500ms",
|
|
65
|
+
position: "relative",
|
|
66
|
+
overflow: "hidden",
|
|
67
|
+
zIndex: 100,
|
|
68
|
+
transformOrigin: "left top"
|
|
69
|
+
}
|
|
70
|
+
}, t = S(), h = S();
|
|
71
|
+
M(
|
|
72
|
+
() => n.autoScale,
|
|
73
|
+
async (i) => {
|
|
74
|
+
i ? (a(), y()) : (f(), v());
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
const d = () => new Promise((i) => {
|
|
78
|
+
h.value.scrollLeft = 0, h.value.scrollTop = 0, x(() => {
|
|
79
|
+
var o, r;
|
|
80
|
+
n.width && n.height ? (e.width = n.width, e.height = n.height) : (e.width = (o = t.value) == null ? void 0 : o.clientWidth, e.height = (r = t.value) == null ? void 0 : r.clientHeight), (!e.originalHeight || !e.originalWidth) && (e.originalWidth = window.screen.width, e.originalHeight = window.screen.height), i();
|
|
81
|
+
});
|
|
82
|
+
}), g = () => {
|
|
83
|
+
e.width && e.height ? (t.value.style.width = `${e.width}px`, t.value.style.height = `${e.height}px`) : (t.value.style.width = `${e.originalWidth}px`, t.value.style.height = `${e.originalHeight}px`);
|
|
84
|
+
}, v = () => {
|
|
85
|
+
t.value && (t.value.style.transform = "", t.value.style.margin = "");
|
|
86
|
+
}, w = (i) => {
|
|
87
|
+
if (!n.autoScale)
|
|
88
|
+
return;
|
|
89
|
+
const o = t.value.clientWidth, r = t.value.clientHeight, l = document.body.clientWidth, s = document.body.clientHeight;
|
|
90
|
+
t.value.style.transform = `scale(${i},${i})`;
|
|
91
|
+
let c = Math.max((l - o * i) / 2, 0), u = Math.max((s - r * i) / 2, 0);
|
|
92
|
+
typeof n.autoScale == "object" && (!n.autoScale.x && (c = 0), !n.autoScale.y && (u = 0)), t.value.style.margin = `${u}px ${c}px`;
|
|
93
|
+
}, p = () => {
|
|
94
|
+
const i = document.body.clientWidth, o = document.body.clientHeight, r = e.width || e.originalWidth, l = e.height || e.originalHeight, s = i / +r, c = o / +l;
|
|
95
|
+
if (n.fullScreen)
|
|
96
|
+
return t.value.style.transform = `scale(${s},${c})`, !1;
|
|
97
|
+
const u = Math.min(s, c);
|
|
98
|
+
w(u);
|
|
99
|
+
}, a = m(async () => {
|
|
100
|
+
await d(), g(), p();
|
|
101
|
+
}, n.delay), $ = () => {
|
|
102
|
+
(e.observer = new MutationObserver(() => {
|
|
103
|
+
a();
|
|
104
|
+
})).observe(t.value, {
|
|
105
|
+
attributes: !0,
|
|
106
|
+
attributeFilter: ["style"],
|
|
107
|
+
attributeOldValue: !0
|
|
108
|
+
});
|
|
109
|
+
}, f = () => {
|
|
110
|
+
window.removeEventListener("resize", a);
|
|
111
|
+
}, y = () => {
|
|
112
|
+
window.addEventListener("resize", a);
|
|
113
|
+
};
|
|
114
|
+
T(() => {
|
|
115
|
+
x(async () => {
|
|
116
|
+
await d(), g(), p(), y();
|
|
117
|
+
});
|
|
118
|
+
}), j(() => {
|
|
119
|
+
f();
|
|
120
|
+
});
|
|
121
|
+
const b = { debounce: m, props: n, state: e, styles: _, screenWrapper: t, box: h, initSize: d, updateSize: g, clearScreenWrapperStyle: v, autoScale: w, updateScale: p, onResize: a, initMutationObserver: $, clearListener: f, addListener: y };
|
|
122
|
+
return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
2
125
|
export {
|
|
3
|
-
|
|
126
|
+
k as default
|
|
4
127
|
};
|
package/es/utils/translate.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { sessionStorageProxy as
|
|
2
|
-
import
|
|
1
|
+
import { sessionStorageProxy as p, storage as s } from "./storage.js";
|
|
2
|
+
import g from "../_virtual/lodash.js";
|
|
3
3
|
import "../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js";
|
|
4
4
|
import { i18nType as c } from "../static/CommonObject.js";
|
|
5
5
|
import { Get as h } from "../api/server.js";
|
|
6
6
|
import y from "../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js";
|
|
7
7
|
const j = (e) => {
|
|
8
|
-
var
|
|
9
|
-
const t =
|
|
8
|
+
var a;
|
|
9
|
+
const t = p.get("employee") || {}, o = E(e);
|
|
10
10
|
if (o === 0) return e;
|
|
11
|
-
const n =
|
|
12
|
-
if (
|
|
11
|
+
const n = p.get(`translate${t.Language}`) || {};
|
|
12
|
+
if (g.isEmpty(n) || t.Language === "zh-CN" || !/[\u4e00-\u9fa5]/.test(e)) return e;
|
|
13
13
|
const l = n[o];
|
|
14
14
|
if (l)
|
|
15
15
|
return l;
|
|
16
16
|
{
|
|
17
|
-
const r = ((
|
|
17
|
+
const r = ((a = s.get("localStorageListId")) == null ? void 0 : a.split(",")) || [];
|
|
18
18
|
if (r.includes(o.toString()))
|
|
19
19
|
return e;
|
|
20
20
|
r.push(o.toString()), s.set("localStorageListId", r.join(","));
|
|
@@ -22,33 +22,33 @@ const j = (e) => {
|
|
|
22
22
|
projectId: "place-order",
|
|
23
23
|
id: o,
|
|
24
24
|
cn: e
|
|
25
|
-
},
|
|
26
|
-
return console.log(
|
|
25
|
+
}, u = "http://api-tools-test.yahee.com.cn:81/api/translation/addTranslate";
|
|
26
|
+
return console.log(u, "url"), y.post(u, m, { withCredentials: !0 }).then((f) => {
|
|
27
27
|
f.data.code;
|
|
28
28
|
}), e;
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
function
|
|
31
|
+
function E(e) {
|
|
32
32
|
let t = 0;
|
|
33
33
|
if (!e || e.length === 0) return t;
|
|
34
34
|
for (let o = 0, n = e.length; o < n; o++) {
|
|
35
|
-
const
|
|
36
|
-
t = (t << 5) - t +
|
|
35
|
+
const i = e.charCodeAt(o);
|
|
36
|
+
t = (t << 5) - t + i, t |= 0;
|
|
37
37
|
}
|
|
38
38
|
return t;
|
|
39
39
|
}
|
|
40
40
|
function S(e, t = "") {
|
|
41
|
-
const o = s.
|
|
42
|
-
if (!e ||
|
|
43
|
-
const n =
|
|
44
|
-
if (n.Language === c.CN) return t;
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
const
|
|
48
|
-
return r ? (
|
|
41
|
+
const o = s.getWithExpireTime("totalEmployees");
|
|
42
|
+
if (!e || g.isEmpty(o)) return t;
|
|
43
|
+
const n = p.get("employee");
|
|
44
|
+
if (n.Language === c.CN && t) return t;
|
|
45
|
+
const i = o[e];
|
|
46
|
+
return i ? n.Language === c.CN ? i.name || t : i.enName || "" : (d(e).then((l) => {
|
|
47
|
+
const a = s.getWithExpireTime("totalEmployees") || {}, r = l.data[0];
|
|
48
|
+
return r ? (a[e] = r, s.setWithExpireTime("totalEmployees", a, 3600 * 1e3), n.Language === c.CN ? r.name || "" : r.enName || "") : t;
|
|
49
49
|
}), t);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function d(e) {
|
|
52
52
|
const t = "/employee/all";
|
|
53
53
|
return h(e ? `${t}?idsStr=${e}` : t);
|
|
54
54
|
}
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "yahee-components",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"description": "深圳前海亚讯前端组件库",
|
|
6
|
-
"main": "lib",
|
|
7
|
-
"module": "es",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"types": "types/index.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"es",
|
|
12
|
-
"lib",
|
|
13
|
-
"types",
|
|
14
|
-
"global.d.ts"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "gulp -f build/gulpfile.js",
|
|
18
|
-
"build:dev": "gulp -f build/gulpfile.js --dev"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [],
|
|
21
|
-
"author": "",
|
|
22
|
-
"license": "ISC",
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@types/node": "^22.7.2",
|
|
25
|
-
"gulp": "^5.0.0",
|
|
26
|
-
"gulp-autoprefixer": "^9.0.0",
|
|
27
|
-
"gulp-sass": "^5.1.0",
|
|
28
|
-
"sass": "^1.78.0",
|
|
29
|
-
"shelljs": "^0.8.5",
|
|
30
|
-
"unplugin-element-plus": "^0.8.0",
|
|
31
|
-
"vite": "^6.0
|
|
32
|
-
},
|
|
33
|
-
"peerDependencies": {
|
|
34
|
-
"@element-plus/icons-vue": "^2.3.1",
|
|
35
|
-
"@vueuse/core": "^11.1.0",
|
|
36
|
-
"dayjs": "^1.11.13",
|
|
37
|
-
"element-plus": "^2.8.3",
|
|
38
|
-
"v3-infinite-loading": "^1.3.2",
|
|
39
|
-
"echarts": "^6.0.0"
|
|
40
|
-
},
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"dotenv": "^16.4.5",
|
|
43
|
-
"install": "^0.13.0",
|
|
44
|
-
"lodash": "^4.17.21"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "yahee-components",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.81",
|
|
5
|
+
"description": "深圳前海亚讯前端组件库",
|
|
6
|
+
"main": "lib",
|
|
7
|
+
"module": "es",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"types": "types/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"es",
|
|
12
|
+
"lib",
|
|
13
|
+
"types",
|
|
14
|
+
"global.d.ts"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "gulp -f build/gulpfile.js",
|
|
18
|
+
"build:dev": "gulp -f build/gulpfile.js --dev"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [],
|
|
21
|
+
"author": "",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^22.7.2",
|
|
25
|
+
"gulp": "^5.0.0",
|
|
26
|
+
"gulp-autoprefixer": "^9.0.0",
|
|
27
|
+
"gulp-sass": "^5.1.0",
|
|
28
|
+
"sass": "^1.78.0",
|
|
29
|
+
"shelljs": "^0.8.5",
|
|
30
|
+
"unplugin-element-plus": "^0.8.0",
|
|
31
|
+
"vite": "^6.1.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@element-plus/icons-vue": "^2.3.1",
|
|
35
|
+
"@vueuse/core": "^11.1.0",
|
|
36
|
+
"dayjs": "^1.11.13",
|
|
37
|
+
"element-plus": "^2.8.3",
|
|
38
|
+
"v3-infinite-loading": "^1.3.2",
|
|
39
|
+
"echarts": "^6.0.0"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"dotenv": "^16.4.5",
|
|
43
|
+
"install": "^0.13.0",
|
|
44
|
+
"lodash": "^4.17.21"
|
|
45
|
+
}
|
|
46
|
+
}
|