yxuse 3.0.87 → 3.0.88

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/index.es5.js CHANGED
@@ -15,8 +15,8 @@ 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 { d as getUserConfig, e as changeSystemConfig, j as jumpToHome, f as getSystemConfig$1, a as http, B as BC_LANG_NAME, i as BC_THEME_NAME, k as setSystemConfig } from "./index.es12.js";
19
- import { f as yxSubscribe, i as isColorEqual } from "./index.es13.js";
18
+ import { d as changeSystemConfig, e as getSystemConfig, a as http, B as BC_LANG_NAME, i as BC_THEME_NAME, y as yxSubscribe, k as setSystemConfig } from "./index.es12.js";
19
+ import { i as isColorEqual } from "./index.es13.js";
20
20
  import "element-plus/es/components/message/style/index";
21
21
  import "element-plus/es/components/loading/style/index";
22
22
  import "element-plus/es/components/message/style/css";
@@ -60,56 +60,6 @@ const _export_sfc = (sfc, props) => {
60
60
  }
61
61
  return target;
62
62
  };
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
63
  function _isSlot(s) {
114
64
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
115
65
  }
@@ -485,7 +435,7 @@ const defaultApiUrl = {
485
435
  URL: "/gateway/integrated-management/api/v1/translate/get"
486
436
  };
487
437
  const config$1 = {
488
- URL: getSystemConfig$1("translateApiUrl") || defaultApiUrl.URL
438
+ URL: getSystemConfig("translateApiUrl") || defaultApiUrl.URL
489
439
  };
490
440
  const translate = async ({ words, systemFlag, toSource = "en", fromSource = "zh", translateApiUrl }) => {
491
441
  try {
@@ -504,15 +454,15 @@ const translate = async ({ words, systemFlag, toSource = "en", fromSource = "zh"
504
454
  return null;
505
455
  }
506
456
  };
507
- const sqlKey = `${getSystemConfig$1("systemKey")}_${window.lang}`;
457
+ const sqlKey = `${getSystemConfig("systemKey")}_${window.lang}`;
508
458
  const whitelistApi = [
509
459
  "/gateway/integrated-management/api/v1/theme/list",
510
460
  "/gateway/integrated-management/api/v1/translate/get",
511
- ...getSystemConfig$1("whitelistTranslateApi")
461
+ ...getSystemConfig("whitelistTranslateApi")
512
462
  ];
513
463
  const getYxI18nThesaurus = async () => {
514
464
  const lang2 = await dbGetItem("lang");
515
- return await dbGetItem(`${getSystemConfig$1("systemKey")}_${lang2}`);
465
+ return await dbGetItem(`${getSystemConfig("systemKey")}_${lang2}`);
516
466
  };
517
467
  const handleTranslation = async (data) => {
518
468
  let result = JSON.stringify(data);
@@ -543,7 +493,7 @@ const handleTranslation = async (data) => {
543
493
  return JSON.parse(result);
544
494
  };
545
495
  async function translatedText(words) {
546
- const result = await translate({ words, toSource: window.lang, systemFlag: getSystemConfig$1("systemKey") });
496
+ const result = await translate({ words, toSource: window.lang, systemFlag: getSystemConfig("systemKey") });
547
497
  return result;
548
498
  }
549
499
  const zhPattern = /[\u4e00-\u9fa5]+/;
@@ -1623,25 +1573,24 @@ export {
1623
1573
  _export_sfc as _,
1624
1574
  theme2 as a,
1625
1575
  BC as b,
1626
- _sfc_main$2 as c,
1627
- changeLang as d,
1628
- getWordByYxI18nThesaurus as e,
1629
- getZhWordByYxI18nThesaurus as f,
1576
+ changeLang as c,
1577
+ getWordByYxI18nThesaurus as d,
1578
+ getZhWordByYxI18nThesaurus as e,
1579
+ install as f,
1630
1580
  getLang as g,
1631
1581
  handleTranslation as h,
1632
1582
  initTranslate as i,
1633
- install as j,
1634
- changeTheme as k,
1583
+ changeTheme as j,
1584
+ setCssVar as k,
1635
1585
  loadCustomThesaurus as l,
1636
- setCssVar as m,
1637
- getDefaultThemeUrl as n,
1638
- getCurTheme as o,
1639
- getCurThemeCssVar as p,
1640
- getGroupColor as q,
1641
- findColorByTheme as r,
1586
+ getDefaultThemeUrl as m,
1587
+ getCurTheme as n,
1588
+ getCurThemeCssVar as o,
1589
+ getGroupColor as p,
1590
+ findColorByTheme as q,
1591
+ installCssVarInSystemTheme as r,
1642
1592
  saveCssVar as s,
1643
1593
  translate2 as t,
1644
1594
  updateTheme as u,
1645
- installCssVarInSystemTheme as v,
1646
1595
  whitelistApi as w
1647
1596
  };
Binary file
package/lib/index.es6.js CHANGED
@@ -3,13 +3,19 @@ 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, c as _sfc_main$8, T as Toolbar, Y as YxTablePro } from "./index.es5.js";
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, d as changeSystemConfig, y as yxSubscribe, e as getSystemConfig } from "./index.es12.js";
9
9
  import "element-plus/es/components/message/style/index";
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";
10
16
  import { u as uploadResourceApi } from "./index.es14.js";
11
17
  const _hoisted_1$4 = { class: "dialog-footer flex justify-end" };
12
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
18
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13
19
  __name: "index",
14
20
  setup(__props, { expose: __expose }) {
15
21
  const dialogOptions = reactive({
@@ -108,7 +114,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
108
114
  }
109
115
  });
110
116
  const _hoisted_1$3 = { class: "dialog-footer flex justify-end" };
111
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
117
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
112
118
  __name: "index",
113
119
  setup(__props, { expose: __expose }) {
114
120
  const drawerOptions = reactive({
@@ -214,7 +220,7 @@ const exportToExcel = ({ header, tableData, fileName }) => {
214
220
  function _isSlot$1(s) {
215
221
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
216
222
  }
217
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
223
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
218
224
  ...{
219
225
  name: "YxTable",
220
226
  inheritAttrs: false
@@ -605,7 +611,7 @@ const Question = { render };
605
611
  function _isSlot(s) {
606
612
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
607
613
  }
608
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
614
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
609
615
  ...{
610
616
  name: "YxForm"
611
617
  },
@@ -949,7 +955,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
949
955
  };
950
956
  }
951
957
  });
952
- const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-03f9a267"]]);
958
+ const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-03f9a267"]]);
953
959
  let versionKey, curVersion, updateApp;
954
960
  const updateSysVersion = () => {
955
961
  localStorage.setItem(versionKey, curVersion);
@@ -968,7 +974,7 @@ const _hoisted_5 = { class: "update-title" };
968
974
  const _hoisted_6 = { class: "update-item px-20" };
969
975
  const _hoisted_7 = { class: "text-end" };
970
976
  const _hoisted_8 = { class: "flex justify-end items-center mt-10" };
971
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
977
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
972
978
  __name: "index",
973
979
  props: {
974
980
  title: {},
@@ -1017,8 +1023,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1017
1023
  };
1018
1024
  }
1019
1025
  });
1020
- const Update = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-ebf4f18f"]]);
1021
- const _sfc_main$2 = {
1026
+ const Update = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ebf4f18f"]]);
1027
+ const _sfc_main$3 = {
1022
1028
  props: {
1023
1029
  color: {
1024
1030
  type: String,
@@ -1038,8 +1044,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1038
1044
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1039
1045
  ], 4);
1040
1046
  }
1041
- const index = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-a90cbe2e"]]);
1042
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1047
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$1], ["__scopeId", "data-v-a90cbe2e"]]);
1048
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1043
1049
  __name: "index",
1044
1050
  props: {
1045
1051
  uploadTips: {},
@@ -1132,6 +1138,59 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1132
1138
  };
1133
1139
  }
1134
1140
  });
1141
+ const defaultCustomConfig = {
1142
+ iconStyle: {
1143
+ width: "116px",
1144
+ height: "20px"
1145
+ }
1146
+ };
1147
+ const _sfc_main$1 = {
1148
+ name: "LogoTitle",
1149
+ props: {
1150
+ showLogo: {
1151
+ type: Boolean,
1152
+ default: true
1153
+ },
1154
+ showTitle: {
1155
+ type: Boolean,
1156
+ default: false
1157
+ },
1158
+ logoCanJump: {
1159
+ type: Boolean,
1160
+ default: true
1161
+ }
1162
+ },
1163
+ data() {
1164
+ return {
1165
+ customConfig: getSystemConfig("globalSystemConfig")
1166
+ };
1167
+ },
1168
+ async created() {
1169
+ await this.getSystemConfig();
1170
+ yxSubscribe.subscribe("globalSystemConfigChange", () => {
1171
+ this.customConfig = getSystemConfig("globalSystemConfig");
1172
+ });
1173
+ },
1174
+ methods: {
1175
+ async getSystemConfig() {
1176
+ try {
1177
+ const data = await getUserConfig();
1178
+ if (!data.isSuccess) return;
1179
+ this.customConfig = {
1180
+ ...defaultCustomConfig,
1181
+ ...data.data
1182
+ };
1183
+ changeSystemConfig("globalSystemConfig", this.customConfig);
1184
+ } catch (e) {
1185
+ }
1186
+ },
1187
+ logoJumpHandle() {
1188
+ var _a;
1189
+ if (((_a = this.customConfig) == null ? void 0 : _a.logoCanJump) === false) return;
1190
+ jumpToHome();
1191
+ }
1192
+ }
1193
+ };
1135
1194
  const _hoisted_1 = ["innerHTML"];
1136
1195
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1137
1196
  var _a, _b, _c, _d;
@@ -1152,7 +1211,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1152
1211
  }, toDisplayString((_d = $data.customConfig) == null ? void 0 : _d.title), 5)) : createCommentVNode("", true)
1153
1212
  ], 2);
1154
1213
  }
1155
- const LogoTitle = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render], ["__scopeId", "data-v-aaaba9d7"]]);
1214
+ const LogoTitle = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-2b4474e1"]]);
1156
1215
  class LogoTitleRender {
1157
1216
  constructor(props, domId = "system-logo-title") {
1158
1217
  this.render(props, domId);
@@ -1232,23 +1291,23 @@ const components2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
1232
1291
  Toolbar,
1233
1292
  Update,
1234
1293
  YxButton: _sfc_main,
1235
- YxDialog: _sfc_main$7,
1236
- YxDrawer: _sfc_main$6,
1294
+ YxDialog: _sfc_main$8,
1295
+ YxDrawer: _sfc_main$7,
1237
1296
  YxForm: index$1,
1238
1297
  YxIcon: index,
1239
- YxTable: _sfc_main$5,
1298
+ YxTable: _sfc_main$6,
1240
1299
  YxTablePro,
1241
- YxUpload: _sfc_main$1
1300
+ YxUpload: _sfc_main$2
1242
1301
  }, Symbol.toStringTag, { value: "Module" }));
1243
1302
  export {
1244
1303
  LogoTitleRender as L,
1245
1304
  Update as U,
1246
- _sfc_main$7 as _,
1247
- _sfc_main$6 as a,
1248
- _sfc_main$5 as b,
1305
+ _sfc_main$8 as _,
1306
+ _sfc_main$7 as a,
1307
+ _sfc_main$6 as b,
1249
1308
  components2 as c,
1250
1309
  index as d,
1251
- _sfc_main$1 as e,
1310
+ _sfc_main$2 as e,
1252
1311
  LogoTitle as f,
1253
1312
  _sfc_main as g,
1254
1313
  index$1 as i
Binary file
package/lib/index.es7.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createI18n } from "vue-i18n";
2
- import { f as getSystemConfig } from "./index.es12.js";
2
+ import { e as getSystemConfig } from "./index.es12.js";
3
3
  const messages = {};
4
4
  window.lang = getSystemConfig("lang");
5
5
  const yxi18n = createI18n({
package/lib/index.es8.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as getUserIsHaveBtnPower } from "./index.es12.js";
1
+ import { f as getUserIsHaveBtnPower } from "./index.es12.js";
2
2
  const auth = {
3
3
  mounted(el, binding) {
4
4
  controlShowByUserPower(el, binding);
package/lib/theme.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { k, r, o, p, n, q, j, v, s, m, u } from "./index.es5.js";
1
+ import { j, q, n, o, m, p, f, r, s, k, u } from "./index.es5.js";
2
2
  import "./index.es4.js";
3
3
  import "vue";
4
4
  import "xlsx";
@@ -20,15 +20,15 @@ import "element-plus/es/components/dialog/style/index";
20
20
  import "element-plus/es/components/button/style/index";
21
21
  import "element-plus/es/components/drawer/style/index";
22
22
  export {
23
- k as changeTheme,
24
- r as findColorByTheme,
25
- o as getCurTheme,
26
- p as getCurThemeCssVar,
27
- n as getDefaultThemeUrl,
28
- q as getGroupColor,
29
- j as install,
30
- v as installCssVarInSystemTheme,
23
+ j as changeTheme,
24
+ q as findColorByTheme,
25
+ n as getCurTheme,
26
+ o as getCurThemeCssVar,
27
+ m as getDefaultThemeUrl,
28
+ p as getGroupColor,
29
+ f as install,
30
+ r as installCssVarInSystemTheme,
31
31
  s as saveCssVar,
32
- m as setCssVar,
32
+ k as setCssVar,
33
33
  u as updateTheme
34
34
  };
@@ -1,4 +1,4 @@
1
- import { d, g, e, f, h, i, l, w } from "./index.es5.js";
1
+ import { c, g, d, e, h, i, l, w } from "./index.es5.js";
2
2
  import "./vendor-lodash.es.js";
3
3
  import "./index.es12.js";
4
4
  import "element-plus";
@@ -20,10 +20,10 @@ import "element-plus/es/components/dialog/style/index";
20
20
  import "element-plus/es/components/button/style/index";
21
21
  import "element-plus/es/components/drawer/style/index";
22
22
  export {
23
- d as changeLang,
23
+ c as changeLang,
24
24
  g as getLang,
25
- e as getWordByYxI18nThesaurus,
26
- f as getZhWordByYxI18nThesaurus,
25
+ d as getWordByYxI18nThesaurus,
26
+ e as getZhWordByYxI18nThesaurus,
27
27
  h as handleTranslation,
28
28
  i as initTranslate,
29
29
  l as loadCustomThesaurus,
package/lib/utils.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs12.js"),s=require("./index.cjs13.js"),o=require("./index.cjs2.js");exports.http=e.http,exports.areColorsSimilar=s.areColorsSimilar,exports.copyText=s.copyText,exports.enumToArray=s.enumToArray,exports.getCownDownTime=s.getCownDownTime,exports.getSelectOptions=s.getSelectOptions,exports.isColorEqual=s.isColorEqual,exports.isDarkColor=s.isDarkColor,exports.notifyMessageToSystems=s.notifyMessageToSystems,exports.receiveMessage=s.receiveMessage,exports.useConfirm=s.useConfirm,exports.yxMessage=s.yxMessage,exports.yxSubscribe=s.yxSubscribe,exports.MQ=o.MQ,exports.WS=o.Ws,exports.yxFecth=o.yxFecth;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs12.js"),s=require("./index.cjs13.js"),o=require("./index.cjs2.js");exports.http=e.http,exports.yxSubscribe=e.yxSubscribe,exports.areColorsSimilar=s.areColorsSimilar,exports.copyText=s.copyText,exports.enumToArray=s.enumToArray,exports.getCownDownTime=s.getCownDownTime,exports.getSelectOptions=s.getSelectOptions,exports.isColorEqual=s.isColorEqual,exports.isDarkColor=s.isDarkColor,exports.notifyMessageToSystems=s.notifyMessageToSystems,exports.receiveMessage=s.receiveMessage,exports.useConfirm=s.useConfirm,exports.yxMessage=s.yxMessage,exports.MQ=o.MQ,exports.WS=o.Ws,exports.yxFecth=o.yxFecth;
package/lib/utils.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a } from "./index.es12.js";
2
- import { a as a2, c, e, g, b, i, d, n, r, u, y, f } from "./index.es13.js";
3
- import { M, W, y as y2 } from "./index.es2.js";
1
+ import { a, y } from "./index.es12.js";
2
+ import { a as a2, c, e, g, b, i, d, n, r, u, y as y2 } from "./index.es13.js";
3
+ import { M, W, y as y3 } from "./index.es2.js";
4
4
  export {
5
5
  M as MQ,
6
6
  W as WS,
@@ -15,7 +15,7 @@ export {
15
15
  n as notifyMessageToSystems,
16
16
  r as receiveMessage,
17
17
  u as useConfirm,
18
- y2 as yxFecth,
19
- y as yxMessage,
20
- f as yxSubscribe
18
+ y3 as yxFecth,
19
+ y2 as yxMessage,
20
+ y as yxSubscribe
21
21
  };
package/lib/yxIcon.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),require("./index.cjs12.js"),require("element-plus"),require("element-plus/es/components/message/style/index"),require("./index.cjs14.js");const e=require("./index.cjs3.js");exports.default=e.index;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),require("./index.cjs12.js"),require("element-plus"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/message-box/style/index"),require("./vendor-dayjs.cjs.js"),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.cjs14.js");const e=require("./index.cjs3.js");exports.default=e.index;
package/lib/yxIcon.es.js CHANGED
@@ -1,6 +1,12 @@
1
1
  import "./index.es12.js";
2
2
  import "element-plus";
3
3
  import "element-plus/es/components/message/style/index";
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";
4
10
  import "./index.es14.js";
5
11
  import { i } from "./index.es3.js";
6
12
  export {