yxuse 3.0.87 → 3.0.89
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/lib/api.cjs.js +1 -1
- package/lib/api.es.js +7 -6
- package/lib/index.cjs12.js +1 -1
- package/lib/index.cjs13.js +1 -1
- package/lib/index.cjs14.js +1 -1
- package/lib/index.cjs15.js +1 -0
- package/lib/index.cjs2.js +1 -1
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs4.js +1 -1
- package/lib/index.cjs5.js +1 -1
- package/lib/index.cjs5.js.gz +0 -0
- package/lib/index.cjs6.js +1 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs7.js +1 -1
- package/lib/index.es12.js +7 -4
- package/lib/index.es12.js.gz +0 -0
- package/lib/index.es13.js +0 -35
- package/lib/index.es14.js +34 -19
- package/lib/index.es15.js +22 -0
- package/lib/index.es2.js +4 -1
- package/lib/index.es3.js +7 -1
- package/lib/index.es4.js +55 -8
- package/lib/index.es5.js +27 -76
- package/lib/index.es5.js.gz +0 -0
- package/lib/index.es6.js +85 -25
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es7.js +8 -0
- package/lib/index.es8.js +1 -1
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +11 -10
- package/lib/translate.es.js +4 -4
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +5 -4
- package/lib/yxIcon.cjs.js +1 -1
- package/lib/yxIcon.es.js +7 -1
- package/lib/yxi18n.cjs.js +1 -1
- package/lib/yxi18n.es.js +8 -0
- package/lib/yxuse.css +1 -1
- package/lib/yxuse.css.gz +0 -0
- package/package.json +1 -1
- package/types/api/config/index.d.ts +17 -0
- package/types/api/index.d.ts +2 -1
- package/types/components/LogoTitle/index.vue.d.ts +1 -0
package/lib/index.es14.js
CHANGED
|
@@ -1,22 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
class YxSubscribe {
|
|
5
|
+
constructor() {
|
|
6
|
+
__publicField(this, "subscribers");
|
|
7
|
+
this.subscribers = {};
|
|
8
8
|
}
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
subscribe(sub, fn) {
|
|
10
|
+
if (!this.subscribers[sub]) {
|
|
11
|
+
this.subscribers[sub] = [];
|
|
12
|
+
}
|
|
13
|
+
this.subscribers[sub].push(fn);
|
|
14
|
+
}
|
|
15
|
+
unsubscribe(sub, fn) {
|
|
16
|
+
const subscribers = this.subscribers[sub];
|
|
17
|
+
if (!fn) return this.subscribers[sub] = [];
|
|
18
|
+
if (subscribers) {
|
|
19
|
+
const index = subscribers.indexOf(fn);
|
|
20
|
+
if (index !== -1) {
|
|
21
|
+
subscribers.splice(index, 1);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
publish(message) {
|
|
26
|
+
const subscribers = this.subscribers[message.type];
|
|
27
|
+
if (subscribers) {
|
|
28
|
+
subscribers.forEach((fn) => {
|
|
29
|
+
fn(message.data);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const yxSubscribe = new YxSubscribe();
|
|
17
35
|
export {
|
|
18
|
-
|
|
19
|
-
getGroupListApi as g,
|
|
20
|
-
index as i,
|
|
21
|
-
uploadResourceApi as u
|
|
36
|
+
yxSubscribe as y
|
|
22
37
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { a as http, U as URL } from "./index.es12.js";
|
|
2
|
+
const uploadResourceApi = (params, config) => http.post(`${URL["ttc"].INTEGRATED_BASE_URL}/file/upload`, params, config);
|
|
3
|
+
const getGroupListApi = () => http.get(
|
|
4
|
+
`${URL["ttc"].INTEGRATED_BASE_URL}/resource/group/list`,
|
|
5
|
+
{},
|
|
6
|
+
{
|
|
7
|
+
headers: { noLoading: true }
|
|
8
|
+
}
|
|
9
|
+
);
|
|
10
|
+
const getResourceListApi = (groupUuid, sign) => http.get(`${URL["ttc"].INTEGRATED_BASE_URL}/resource/file/list/${sign}/${groupUuid}`, {}, { headers: { noLoading: true } });
|
|
11
|
+
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12
|
+
__proto__: null,
|
|
13
|
+
getGroupListApi,
|
|
14
|
+
getResourceListApi,
|
|
15
|
+
uploadResourceApi
|
|
16
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
+
export {
|
|
18
|
+
getResourceListApi as a,
|
|
19
|
+
getGroupListApi as g,
|
|
20
|
+
index as i,
|
|
21
|
+
uploadResourceApi as u
|
|
22
|
+
};
|
package/lib/index.es2.js
CHANGED
|
@@ -2,9 +2,12 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { g as getToken, s as showFullScreenLoading, h as hideFullScreenLoading, c as checkStatus, a as http } from "./index.es12.js";
|
|
5
|
-
import { a as areColorsSimilar, c as copyText, e as enumToArray, g as getCownDownTime, b as getSelectOptions, i as isColorEqual, d as isDarkColor, n as notifyMessageToSystems, r as receiveMessage, u as useConfirm, y as yxMessage
|
|
5
|
+
import { a as areColorsSimilar, c as copyText, e as enumToArray, g as getCownDownTime, b as getSelectOptions, i as isColorEqual, d as isDarkColor, n as notifyMessageToSystems, r as receiveMessage, u as useConfirm, y as yxMessage } from "./index.es13.js";
|
|
6
|
+
import { y as yxSubscribe } from "./index.es14.js";
|
|
6
7
|
import "element-plus";
|
|
7
8
|
import "element-plus/es/components/message/style/index";
|
|
9
|
+
import "element-plus/es/components/message-box/style/index";
|
|
10
|
+
import "./vendor-dayjs.es.js";
|
|
8
11
|
import { m as mqtt_minExports } from "./vendor-mqtt.es.js";
|
|
9
12
|
function buildQuery(params) {
|
|
10
13
|
if (!params) return "";
|
package/lib/index.es3.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import "./index.es12.js";
|
|
2
2
|
import "element-plus";
|
|
3
3
|
import "element-plus/es/components/message/style/index";
|
|
4
|
-
import
|
|
4
|
+
import "element-plus/es/components/message-box/style/index";
|
|
5
|
+
import "./vendor-dayjs.es.js";
|
|
6
|
+
import "element-plus/es/components/loading/style/index";
|
|
7
|
+
import "element-plus/es/components/message/style/css";
|
|
8
|
+
import "element-plus/es/components/loading/style/css";
|
|
9
|
+
import "./vendor-mqtt.es.js";
|
|
10
|
+
import { g as getGroupListApi, a as getResourceListApi } from "./index.es15.js";
|
|
5
11
|
const ICON_GROUP_NAME = "yxIcon";
|
|
6
12
|
const initYxIcon = () => {
|
|
7
13
|
getYxIconGroupUuid();
|
package/lib/index.es4.js
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
|
-
import { a as http, U as URL, l as index$
|
|
2
|
-
import { i as index } from "./index.
|
|
1
|
+
import { a as http, U as URL, l as index$2 } from "./index.es12.js";
|
|
2
|
+
import { i as index$1 } from "./index.es15.js";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import "element-plus/es/components/message/style/index";
|
|
5
|
+
import "element-plus/es/components/message-box/style/index";
|
|
6
|
+
import "./vendor-dayjs.es.js";
|
|
7
|
+
import { y as yxSubscribe } from "./index.es14.js";
|
|
8
|
+
import "element-plus/es/components/loading/style/index";
|
|
9
|
+
import "element-plus/es/components/message/style/css";
|
|
10
|
+
import "element-plus/es/components/loading/style/css";
|
|
11
|
+
import "./vendor-mqtt.es.js";
|
|
12
|
+
const GLOBAL_SYSTEM_CONFIG_KEY = "GlobalConfig";
|
|
13
|
+
const getGlobalName = (systemName = "ttc") => {
|
|
14
|
+
return `${systemName}${GLOBAL_SYSTEM_CONFIG_KEY}`;
|
|
15
|
+
};
|
|
16
|
+
const getStorage = (systemName) => {
|
|
17
|
+
return localStorage.getItem(`${getGlobalName(systemName)}`) ?? "{}";
|
|
18
|
+
};
|
|
19
|
+
const setStorage = (systemName, value) => {
|
|
20
|
+
localStorage.setItem(`${getGlobalName(systemName)}`, JSON.stringify(value));
|
|
21
|
+
};
|
|
22
|
+
const setGlobalSystemConfig = (config, systemName = "ttc") => {
|
|
23
|
+
const GlobalState = getStorage(systemName);
|
|
24
|
+
const newGlobalState = { ...JSON.parse(GlobalState), ...config };
|
|
25
|
+
setStorage(systemName, newGlobalState);
|
|
26
|
+
yxSubscribe.publish({ type: "globalSystemConfigChange", data: newGlobalState });
|
|
27
|
+
};
|
|
28
|
+
const changeGlobalSystemConfig = (key, value, systemName = "ttc") => {
|
|
29
|
+
const GlobalState = getStorage(systemName);
|
|
30
|
+
const newGlobalState = { ...JSON.parse(GlobalState), [key]: value };
|
|
31
|
+
setStorage(systemName, newGlobalState);
|
|
32
|
+
};
|
|
33
|
+
const getGlobalSystemConfig = (key, systemName = "ttc") => {
|
|
34
|
+
const GlobalState = JSON.parse(getStorage(systemName));
|
|
35
|
+
if (key) {
|
|
36
|
+
return GlobalState[key] ?? "";
|
|
37
|
+
}
|
|
38
|
+
return GlobalState;
|
|
39
|
+
};
|
|
40
|
+
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
41
|
+
__proto__: null,
|
|
42
|
+
changeGlobalSystemConfig,
|
|
43
|
+
getGlobalSystemConfig,
|
|
44
|
+
setGlobalSystemConfig
|
|
45
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3
46
|
const getUserSelectSatelliteList = async (systemName = "ttc") => {
|
|
4
47
|
const data = await http.get(`${URL[systemName].INTEGRATED_BASE_URL}/basic/data/satellite/select`);
|
|
5
48
|
return data;
|
|
@@ -16,8 +59,9 @@ const getCommentUntreatedCount = async (systemName = "ttc") => {
|
|
|
16
59
|
};
|
|
17
60
|
const api2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18
61
|
__proto__: null,
|
|
19
|
-
assets: index,
|
|
20
|
-
auth: index$
|
|
62
|
+
assets: index$1,
|
|
63
|
+
auth: index$2,
|
|
64
|
+
config: index,
|
|
21
65
|
getCommentUntreatedCount,
|
|
22
66
|
getUserSelectAnteList,
|
|
23
67
|
getUserSelectSatelliteList,
|
|
@@ -25,8 +69,11 @@ const api2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
25
69
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
26
70
|
export {
|
|
27
71
|
api2 as a,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
72
|
+
getCommentUntreatedCount as b,
|
|
73
|
+
getUserThemeList as c,
|
|
74
|
+
getUserSelectSatelliteList as d,
|
|
75
|
+
getUserSelectAnteList as e,
|
|
76
|
+
getGlobalSystemConfig as g,
|
|
77
|
+
index as i,
|
|
78
|
+
setGlobalSystemConfig as s
|
|
32
79
|
};
|
package/lib/index.es5.js
CHANGED
|
@@ -8,24 +8,25 @@ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot
|
|
|
8
8
|
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var _elId;
|
|
11
|
-
import {
|
|
11
|
+
import { b as getCommentUntreatedCount, c as getUserThemeList } from "./index.es4.js";
|
|
12
12
|
import { ref, defineComponent, onBeforeMount, onMounted, nextTick, watch, createVNode, withModifiers, resolveComponent, mergeProps, isVNode, createElementBlock, openBlock, createStaticVNode, createElementVNode, withDirectives, toDisplayString, vShow, createBlock, Transition, withCtx, normalizeClass, createCommentVNode, normalizeStyle, Fragment, renderList, resolveDynamicComponent, useCssVars, version, createApp } from "vue";
|
|
13
13
|
import "xlsx";
|
|
14
14
|
import "./vendor-file-saver.es.js";
|
|
15
15
|
import "xlsx-js-style";
|
|
16
16
|
import { S as Sortable } from "./vendor-sortablejs.es.js";
|
|
17
17
|
import "element-plus";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { e as changeSystemConfig, f as getSystemConfig, a as http, B as BC_LANG_NAME, i as BC_THEME_NAME, k as setSystemConfig } from "./index.es12.js";
|
|
19
|
+
import { i as isColorEqual } from "./index.es13.js";
|
|
20
|
+
import { y as yxSubscribe } from "./index.es14.js";
|
|
20
21
|
import "element-plus/es/components/message/style/index";
|
|
21
22
|
import "element-plus/es/components/loading/style/index";
|
|
22
23
|
import "element-plus/es/components/message/style/css";
|
|
23
24
|
import "element-plus/es/components/loading/style/css";
|
|
24
25
|
import "./vendor-mqtt.es.js";
|
|
25
26
|
import { l as localforage } from "./vendor-localforage.es.js";
|
|
26
|
-
import { _ } from "./vendor-lodash.es.js";
|
|
27
27
|
import "element-plus/es/components/message-box/style/index";
|
|
28
28
|
import "./vendor-dayjs.es.js";
|
|
29
|
+
import { _ } from "./vendor-lodash.es.js";
|
|
29
30
|
import "./index.es7.js";
|
|
30
31
|
import "./index.es11.js";
|
|
31
32
|
import "element-plus/es/components/dialog/style/index";
|
|
@@ -60,56 +61,6 @@ const _export_sfc = (sfc, props) => {
|
|
|
60
61
|
}
|
|
61
62
|
return target;
|
|
62
63
|
};
|
|
63
|
-
const customConfig = {
|
|
64
|
-
iconStyle: {
|
|
65
|
-
width: "116px",
|
|
66
|
-
height: "20px"
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
async function getSystemConfig() {
|
|
70
|
-
try {
|
|
71
|
-
const data = await getUserConfig();
|
|
72
|
-
if (!data.isSuccess) return;
|
|
73
|
-
window.GLOBAL_SYSTEM_CONFIG = {
|
|
74
|
-
...customConfig,
|
|
75
|
-
...data.data
|
|
76
|
-
};
|
|
77
|
-
changeSystemConfig("globalSystemConfig", window.GLOBAL_SYSTEM_CONFIG);
|
|
78
|
-
} catch (e) {
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
(async () => {
|
|
82
|
-
await getSystemConfig();
|
|
83
|
-
})();
|
|
84
|
-
const _sfc_main$2 = {
|
|
85
|
-
name: "LogoTitle",
|
|
86
|
-
props: {
|
|
87
|
-
showLogo: {
|
|
88
|
-
type: Boolean,
|
|
89
|
-
default: true
|
|
90
|
-
},
|
|
91
|
-
showTitle: {
|
|
92
|
-
type: Boolean,
|
|
93
|
-
default: false
|
|
94
|
-
},
|
|
95
|
-
logoCanJump: {
|
|
96
|
-
type: Boolean,
|
|
97
|
-
default: true
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
data() {
|
|
101
|
-
return {
|
|
102
|
-
customConfig: window.GLOBAL_SYSTEM_CONFIG
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
methods: {
|
|
106
|
-
logoJumpHandle() {
|
|
107
|
-
var _a;
|
|
108
|
-
if (((_a = this.customConfig) == null ? void 0 : _a.logoCanJump) === false) return;
|
|
109
|
-
jumpToHome();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
64
|
function _isSlot(s) {
|
|
114
65
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
115
66
|
}
|
|
@@ -485,7 +436,7 @@ const defaultApiUrl = {
|
|
|
485
436
|
URL: "/gateway/integrated-management/api/v1/translate/get"
|
|
486
437
|
};
|
|
487
438
|
const config$1 = {
|
|
488
|
-
URL: getSystemConfig
|
|
439
|
+
URL: getSystemConfig("translateApiUrl") || defaultApiUrl.URL
|
|
489
440
|
};
|
|
490
441
|
const translate = async ({ words, systemFlag, toSource = "en", fromSource = "zh", translateApiUrl }) => {
|
|
491
442
|
try {
|
|
@@ -504,15 +455,15 @@ const translate = async ({ words, systemFlag, toSource = "en", fromSource = "zh"
|
|
|
504
455
|
return null;
|
|
505
456
|
}
|
|
506
457
|
};
|
|
507
|
-
const sqlKey = `${getSystemConfig
|
|
458
|
+
const sqlKey = `${getSystemConfig("systemKey")}_${window.lang}`;
|
|
508
459
|
const whitelistApi = [
|
|
509
460
|
"/gateway/integrated-management/api/v1/theme/list",
|
|
510
461
|
"/gateway/integrated-management/api/v1/translate/get",
|
|
511
|
-
...getSystemConfig
|
|
462
|
+
...getSystemConfig("whitelistTranslateApi")
|
|
512
463
|
];
|
|
513
464
|
const getYxI18nThesaurus = async () => {
|
|
514
465
|
const lang2 = await dbGetItem("lang");
|
|
515
|
-
return await dbGetItem(`${getSystemConfig
|
|
466
|
+
return await dbGetItem(`${getSystemConfig("systemKey")}_${lang2}`);
|
|
516
467
|
};
|
|
517
468
|
const handleTranslation = async (data) => {
|
|
518
469
|
let result = JSON.stringify(data);
|
|
@@ -543,7 +494,7 @@ const handleTranslation = async (data) => {
|
|
|
543
494
|
return JSON.parse(result);
|
|
544
495
|
};
|
|
545
496
|
async function translatedText(words) {
|
|
546
|
-
const result = await translate({ words, toSource: window.lang, systemFlag: getSystemConfig
|
|
497
|
+
const result = await translate({ words, toSource: window.lang, systemFlag: getSystemConfig("systemKey") });
|
|
547
498
|
return result;
|
|
548
499
|
}
|
|
549
500
|
const zhPattern = /[\u4e00-\u9fa5]+/;
|
|
@@ -1391,6 +1342,7 @@ const _Toolbar = class _Toolbar {
|
|
|
1391
1342
|
_elId = new WeakMap();
|
|
1392
1343
|
_Toolbar.instance = null;
|
|
1393
1344
|
let Toolbar = _Toolbar;
|
|
1345
|
+
const TTC_THTEME_KEY = "ttcGlobalTheme";
|
|
1394
1346
|
const install = async (config2) => {
|
|
1395
1347
|
var _a;
|
|
1396
1348
|
config2 = { ...defaultConfig, ...config2 };
|
|
@@ -1440,13 +1392,13 @@ const initTtcFont = () => {
|
|
|
1440
1392
|
document.head.appendChild(style);
|
|
1441
1393
|
};
|
|
1442
1394
|
const saveCssVar = ({ themeCssVar, themeId }) => {
|
|
1443
|
-
const ttcGlobalState = localStorage.getItem(
|
|
1395
|
+
const ttcGlobalState = localStorage.getItem(TTC_THTEME_KEY) || "{}";
|
|
1444
1396
|
const globalState = JSON.parse(ttcGlobalState);
|
|
1445
1397
|
globalState.theme = {
|
|
1446
1398
|
themeCssVar,
|
|
1447
1399
|
id: themeId
|
|
1448
1400
|
};
|
|
1449
|
-
localStorage.setItem(
|
|
1401
|
+
localStorage.setItem(TTC_THTEME_KEY, JSON.stringify(globalState));
|
|
1450
1402
|
};
|
|
1451
1403
|
const changeTheme = async (theme3) => {
|
|
1452
1404
|
const themeCssVar = await setCssVar(theme3.themeUrl);
|
|
@@ -1513,13 +1465,13 @@ const getDefaultThemeUrl = async () => {
|
|
|
1513
1465
|
};
|
|
1514
1466
|
const getCurTheme = () => {
|
|
1515
1467
|
var _a;
|
|
1516
|
-
const ttcGlobalState = localStorage.getItem(
|
|
1468
|
+
const ttcGlobalState = localStorage.getItem(TTC_THTEME_KEY);
|
|
1517
1469
|
const theme3 = ttcGlobalState && ((_a = JSON.parse(ttcGlobalState)) == null ? void 0 : _a.theme);
|
|
1518
1470
|
return (theme3 == null ? void 0 : theme3.id) || null;
|
|
1519
1471
|
};
|
|
1520
1472
|
const getCurThemeCssVar = () => {
|
|
1521
1473
|
var _a;
|
|
1522
|
-
const ttcGlobalState = localStorage.getItem(
|
|
1474
|
+
const ttcGlobalState = localStorage.getItem(TTC_THTEME_KEY);
|
|
1523
1475
|
const theme3 = ttcGlobalState && ((_a = JSON.parse(ttcGlobalState)) == null ? void 0 : _a.theme);
|
|
1524
1476
|
return (theme3 == null ? void 0 : theme3.themeCssVar) || {};
|
|
1525
1477
|
};
|
|
@@ -1623,25 +1575,24 @@ export {
|
|
|
1623
1575
|
_export_sfc as _,
|
|
1624
1576
|
theme2 as a,
|
|
1625
1577
|
BC as b,
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1578
|
+
changeLang as c,
|
|
1579
|
+
getWordByYxI18nThesaurus as d,
|
|
1580
|
+
getZhWordByYxI18nThesaurus as e,
|
|
1581
|
+
install as f,
|
|
1630
1582
|
getLang as g,
|
|
1631
1583
|
handleTranslation as h,
|
|
1632
1584
|
initTranslate as i,
|
|
1633
|
-
|
|
1634
|
-
|
|
1585
|
+
changeTheme as j,
|
|
1586
|
+
setCssVar as k,
|
|
1635
1587
|
loadCustomThesaurus as l,
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1588
|
+
getDefaultThemeUrl as m,
|
|
1589
|
+
getCurTheme as n,
|
|
1590
|
+
getCurThemeCssVar as o,
|
|
1591
|
+
getGroupColor as p,
|
|
1592
|
+
findColorByTheme as q,
|
|
1593
|
+
installCssVarInSystemTheme as r,
|
|
1642
1594
|
saveCssVar as s,
|
|
1643
1595
|
translate2 as t,
|
|
1644
1596
|
updateTheme as u,
|
|
1645
|
-
installCssVarInSystemTheme as v,
|
|
1646
1597
|
whitelistApi as w
|
|
1647
1598
|
};
|
package/lib/index.es5.js.gz
CHANGED
|
Binary file
|
package/lib/index.es6.js
CHANGED
|
@@ -3,13 +3,21 @@ import * as XLSX from "xlsx";
|
|
|
3
3
|
import "./vendor-file-saver.es.js";
|
|
4
4
|
import "xlsx-js-style";
|
|
5
5
|
import { S as Sortable } from "./vendor-sortablejs.es.js";
|
|
6
|
-
import { _ as _export_sfc,
|
|
6
|
+
import { _ as _export_sfc, T as Toolbar, Y as YxTablePro } from "./index.es5.js";
|
|
7
7
|
import { genFileId } from "element-plus";
|
|
8
|
-
import "./index.es12.js";
|
|
8
|
+
import { j as jumpToHome, b as getUserConfig } from "./index.es12.js";
|
|
9
9
|
import "element-plus/es/components/message/style/index";
|
|
10
|
-
import
|
|
10
|
+
import "element-plus/es/components/message-box/style/index";
|
|
11
|
+
import "./vendor-dayjs.es.js";
|
|
12
|
+
import "element-plus/es/components/loading/style/index";
|
|
13
|
+
import "element-plus/es/components/message/style/css";
|
|
14
|
+
import "element-plus/es/components/loading/style/css";
|
|
15
|
+
import "./vendor-mqtt.es.js";
|
|
16
|
+
import { u as uploadResourceApi } from "./index.es15.js";
|
|
17
|
+
import { s as setGlobalSystemConfig, g as getGlobalSystemConfig } from "./index.es4.js";
|
|
18
|
+
import { y as yxSubscribe } from "./index.es14.js";
|
|
11
19
|
const _hoisted_1$4 = { class: "dialog-footer flex justify-end" };
|
|
12
|
-
const _sfc_main$
|
|
20
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
13
21
|
__name: "index",
|
|
14
22
|
setup(__props, { expose: __expose }) {
|
|
15
23
|
const dialogOptions = reactive({
|
|
@@ -108,7 +116,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
108
116
|
}
|
|
109
117
|
});
|
|
110
118
|
const _hoisted_1$3 = { class: "dialog-footer flex justify-end" };
|
|
111
|
-
const _sfc_main$
|
|
119
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
112
120
|
__name: "index",
|
|
113
121
|
setup(__props, { expose: __expose }) {
|
|
114
122
|
const drawerOptions = reactive({
|
|
@@ -214,7 +222,7 @@ const exportToExcel = ({ header, tableData, fileName }) => {
|
|
|
214
222
|
function _isSlot$1(s) {
|
|
215
223
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
216
224
|
}
|
|
217
|
-
const _sfc_main$
|
|
225
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
218
226
|
...{
|
|
219
227
|
name: "YxTable",
|
|
220
228
|
inheritAttrs: false
|
|
@@ -605,7 +613,7 @@ const Question = { render };
|
|
|
605
613
|
function _isSlot(s) {
|
|
606
614
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
607
615
|
}
|
|
608
|
-
const _sfc_main$
|
|
616
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
609
617
|
...{
|
|
610
618
|
name: "YxForm"
|
|
611
619
|
},
|
|
@@ -868,12 +876,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
868
876
|
...formProps
|
|
869
877
|
} = form;
|
|
870
878
|
return createVNode(resolveComponent("el-form-item"), mergeProps({
|
|
871
|
-
"class": `${formLayout === "vertical" ? "flex flex-col " : ""} ${(formStyle == null ? void 0 : formStyle.formItemClassName) ?? ""} ${className ?? ""} ${!form.label ? "no-label-item" : ""}
|
|
872
|
-
}, formProps, {
|
|
879
|
+
"class": `${formLayout === "vertical" ? "flex flex-col " : ""} ${(formStyle == null ? void 0 : formStyle.formItemClassName) ?? ""} ${className ?? ""} ${!form.label ? "no-label-item" : ""}`,
|
|
873
880
|
"prop": form.prop,
|
|
874
881
|
"labelWidth": formStyle == null ? void 0 : formStyle.labelWidth,
|
|
875
882
|
"key": form.prop
|
|
876
|
-
}), {
|
|
883
|
+
}, formProps), {
|
|
877
884
|
default: () => {
|
|
878
885
|
if (form == null ? void 0 : form.render) return form == null ? void 0 : form.render(formData.value);
|
|
879
886
|
if (form.renderType) return dynamicComponent(form);
|
|
@@ -949,7 +956,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
949
956
|
};
|
|
950
957
|
}
|
|
951
958
|
});
|
|
952
|
-
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
959
|
+
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-7611548b"]]);
|
|
953
960
|
let versionKey, curVersion, updateApp;
|
|
954
961
|
const updateSysVersion = () => {
|
|
955
962
|
localStorage.setItem(versionKey, curVersion);
|
|
@@ -968,7 +975,7 @@ const _hoisted_5 = { class: "update-title" };
|
|
|
968
975
|
const _hoisted_6 = { class: "update-item px-20" };
|
|
969
976
|
const _hoisted_7 = { class: "text-end" };
|
|
970
977
|
const _hoisted_8 = { class: "flex justify-end items-center mt-10" };
|
|
971
|
-
const _sfc_main$
|
|
978
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
972
979
|
__name: "index",
|
|
973
980
|
props: {
|
|
974
981
|
title: {},
|
|
@@ -1017,8 +1024,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1017
1024
|
};
|
|
1018
1025
|
}
|
|
1019
1026
|
});
|
|
1020
|
-
const Update = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1021
|
-
const _sfc_main$
|
|
1027
|
+
const Update = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ebf4f18f"]]);
|
|
1028
|
+
const _sfc_main$3 = {
|
|
1022
1029
|
props: {
|
|
1023
1030
|
color: {
|
|
1024
1031
|
type: String,
|
|
@@ -1038,8 +1045,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1038
1045
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1039
1046
|
], 4);
|
|
1040
1047
|
}
|
|
1041
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1042
|
-
const _sfc_main$
|
|
1048
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$1], ["__scopeId", "data-v-a90cbe2e"]]);
|
|
1049
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1043
1050
|
__name: "index",
|
|
1044
1051
|
props: {
|
|
1045
1052
|
uploadTips: {},
|
|
@@ -1132,6 +1139,59 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1132
1139
|
};
|
|
1133
1140
|
}
|
|
1134
1141
|
});
|
|
1142
|
+
const defaultCustomConfig = {
|
|
1143
|
+
iconStyle: {
|
|
1144
|
+
width: "116px",
|
|
1145
|
+
height: "20px"
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
const _sfc_main$1 = {
|
|
1149
|
+
name: "LogoTitle",
|
|
1150
|
+
props: {
|
|
1151
|
+
showLogo: {
|
|
1152
|
+
type: Boolean,
|
|
1153
|
+
default: true
|
|
1154
|
+
},
|
|
1155
|
+
showTitle: {
|
|
1156
|
+
type: Boolean,
|
|
1157
|
+
default: false
|
|
1158
|
+
},
|
|
1159
|
+
logoCanJump: {
|
|
1160
|
+
type: Boolean,
|
|
1161
|
+
default: true
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
data() {
|
|
1165
|
+
return {
|
|
1166
|
+
customConfig: getGlobalSystemConfig()
|
|
1167
|
+
};
|
|
1168
|
+
},
|
|
1169
|
+
async created() {
|
|
1170
|
+
yxSubscribe.subscribe("globalSystemConfigChange", () => {
|
|
1171
|
+
this.customConfig = getGlobalSystemConfig();
|
|
1172
|
+
});
|
|
1173
|
+
await this.getSystemConfig();
|
|
1174
|
+
},
|
|
1175
|
+
methods: {
|
|
1176
|
+
async getSystemConfig() {
|
|
1177
|
+
try {
|
|
1178
|
+
const data = await getUserConfig();
|
|
1179
|
+
if (!data.isSuccess) return;
|
|
1180
|
+
this.customConfig = {
|
|
1181
|
+
...defaultCustomConfig,
|
|
1182
|
+
...data.data
|
|
1183
|
+
};
|
|
1184
|
+
setGlobalSystemConfig(this.customConfig);
|
|
1185
|
+
} catch (e) {
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
logoJumpHandle() {
|
|
1189
|
+
var _a;
|
|
1190
|
+
if (((_a = this.customConfig) == null ? void 0 : _a.logoCanJump) === false) return;
|
|
1191
|
+
jumpToHome();
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1135
1195
|
const _hoisted_1 = ["innerHTML"];
|
|
1136
1196
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1137
1197
|
var _a, _b, _c, _d;
|
|
@@ -1152,7 +1212,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1152
1212
|
}, toDisplayString((_d = $data.customConfig) == null ? void 0 : _d.title), 5)) : createCommentVNode("", true)
|
|
1153
1213
|
], 2);
|
|
1154
1214
|
}
|
|
1155
|
-
const LogoTitle = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1215
|
+
const LogoTitle = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-f9e99774"]]);
|
|
1156
1216
|
class LogoTitleRender {
|
|
1157
1217
|
constructor(props, domId = "system-logo-title") {
|
|
1158
1218
|
this.render(props, domId);
|
|
@@ -1232,23 +1292,23 @@ const components2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
1232
1292
|
Toolbar,
|
|
1233
1293
|
Update,
|
|
1234
1294
|
YxButton: _sfc_main,
|
|
1235
|
-
YxDialog: _sfc_main$
|
|
1236
|
-
YxDrawer: _sfc_main$
|
|
1295
|
+
YxDialog: _sfc_main$8,
|
|
1296
|
+
YxDrawer: _sfc_main$7,
|
|
1237
1297
|
YxForm: index$1,
|
|
1238
1298
|
YxIcon: index,
|
|
1239
|
-
YxTable: _sfc_main$
|
|
1299
|
+
YxTable: _sfc_main$6,
|
|
1240
1300
|
YxTablePro,
|
|
1241
|
-
YxUpload: _sfc_main$
|
|
1301
|
+
YxUpload: _sfc_main$2
|
|
1242
1302
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1243
1303
|
export {
|
|
1244
1304
|
LogoTitleRender as L,
|
|
1245
1305
|
Update as U,
|
|
1246
|
-
_sfc_main$
|
|
1247
|
-
_sfc_main$
|
|
1248
|
-
_sfc_main$
|
|
1306
|
+
_sfc_main$8 as _,
|
|
1307
|
+
_sfc_main$7 as a,
|
|
1308
|
+
_sfc_main$6 as b,
|
|
1249
1309
|
components2 as c,
|
|
1250
1310
|
index as d,
|
|
1251
|
-
_sfc_main$
|
|
1311
|
+
_sfc_main$2 as e,
|
|
1252
1312
|
LogoTitle as f,
|
|
1253
1313
|
_sfc_main as g,
|
|
1254
1314
|
index$1 as i
|
package/lib/index.es6.js.gz
CHANGED
|
Binary file
|
package/lib/index.es7.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { createI18n } from "vue-i18n";
|
|
2
2
|
import { f as getSystemConfig } from "./index.es12.js";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import "element-plus/es/components/message/style/index";
|
|
5
|
+
import "element-plus/es/components/message-box/style/index";
|
|
6
|
+
import "./vendor-dayjs.es.js";
|
|
7
|
+
import "element-plus/es/components/loading/style/index";
|
|
8
|
+
import "element-plus/es/components/message/style/css";
|
|
9
|
+
import "element-plus/es/components/loading/style/css";
|
|
10
|
+
import "./vendor-mqtt.es.js";
|
|
3
11
|
const messages = {};
|
|
4
12
|
window.lang = getSystemConfig("lang");
|
|
5
13
|
const yxi18n = createI18n({
|
package/lib/index.es8.js
CHANGED
package/lib/theme.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs5.js");require("./index.cjs4.js"),require("vue"),require("xlsx"),require("./vendor-file-saver.cjs.js"),require("xlsx-js-style"),require("./vendor-sortablejs.cjs.js"),require("element-plus"),require("./index.cjs12.js"),require("./index.cjs13.js"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/loading/style/index"),require("element-plus/es/components/message/style/css"),require("element-plus/es/components/loading/style/css"),require("./vendor-mqtt.cjs.js"),require("./index.cjs7.js"),require("./index.cjs11.js"),require("element-plus/es/components/message-box/style/index"),require("element-plus/es/components/dialog/style/index"),require("element-plus/es/components/button/style/index"),require("element-plus/es/components/drawer/style/index"),exports.changeTheme=e.changeTheme,exports.findColorByTheme=e.findColorByTheme,exports.getCurTheme=e.getCurTheme,exports.getCurThemeCssVar=e.getCurThemeCssVar,exports.getDefaultThemeUrl=e.getDefaultThemeUrl,exports.getGroupColor=e.getGroupColor,exports.install=e.install,exports.installCssVarInSystemTheme=e.installCssVarInSystemTheme,exports.saveCssVar=e.saveCssVar,exports.setCssVar=e.setCssVar,exports.updateTheme=e.updateTheme;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs5.js");require("./index.cjs4.js"),require("vue"),require("xlsx"),require("./vendor-file-saver.cjs.js"),require("xlsx-js-style"),require("./vendor-sortablejs.cjs.js"),require("element-plus"),require("./index.cjs12.js"),require("./index.cjs13.js"),require("./index.cjs14.js"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/loading/style/index"),require("element-plus/es/components/message/style/css"),require("element-plus/es/components/loading/style/css"),require("./vendor-mqtt.cjs.js"),require("./index.cjs7.js"),require("./index.cjs11.js"),require("element-plus/es/components/message-box/style/index"),require("element-plus/es/components/dialog/style/index"),require("element-plus/es/components/button/style/index"),require("element-plus/es/components/drawer/style/index"),exports.changeTheme=e.changeTheme,exports.findColorByTheme=e.findColorByTheme,exports.getCurTheme=e.getCurTheme,exports.getCurThemeCssVar=e.getCurThemeCssVar,exports.getDefaultThemeUrl=e.getDefaultThemeUrl,exports.getGroupColor=e.getGroupColor,exports.install=e.install,exports.installCssVarInSystemTheme=e.installCssVarInSystemTheme,exports.saveCssVar=e.saveCssVar,exports.setCssVar=e.setCssVar,exports.updateTheme=e.updateTheme;
|