yxuse 3.0.40 → 3.0.41

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.
Binary file
package/lib/index.es.js CHANGED
@@ -9,11 +9,6 @@ import { y as yxHooks } from "./index.es8.js";
9
9
  import { a as app } from "./index.es9.js";
10
10
  import { i } from "./index.es9.js";
11
11
  import { u } from "./index.es10.js";
12
- import "./index.es11.js";
13
- import "element-plus";
14
- import "./index.es12.js";
15
- import "./index.es13.js";
16
- import "vue";
17
12
  const index$1 = {
18
13
  install: (app2) => {
19
14
  app2.config.globalProperties.$yx18n = (key) => {
package/lib/index.es10.js CHANGED
@@ -18,8 +18,7 @@ var dayjs_min = { exports: {} };
18
18
  var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
19
19
  return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
20
20
  }, m: function t2(e2, n2) {
21
- if (e2.date() < n2.date())
22
- return -t2(n2, e2);
21
+ if (e2.date() < n2.date()) return -t2(n2, e2);
23
22
  var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
24
23
  return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
25
24
  }, a: function(t2) {
@@ -34,22 +33,19 @@ var dayjs_min = { exports: {} };
34
33
  return t2 instanceof _ || !(!t2 || !t2[p]);
35
34
  }, w = function t2(e2, n2, r2) {
36
35
  var i2;
37
- if (!e2)
38
- return g;
36
+ if (!e2) return g;
39
37
  if ("string" == typeof e2) {
40
38
  var s2 = e2.toLowerCase();
41
39
  D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
42
40
  var u2 = e2.split("-");
43
- if (!i2 && u2.length > 1)
44
- return t2(u2[0]);
41
+ if (!i2 && u2.length > 1) return t2(u2[0]);
45
42
  } else {
46
43
  var a2 = e2.name;
47
44
  D[a2] = e2, i2 = a2;
48
45
  }
49
46
  return !r2 && i2 && (g = i2), i2 || !r2 && g;
50
47
  }, O = function(t2, e2) {
51
- if (S(t2))
52
- return t2.clone();
48
+ if (S(t2)) return t2.clone();
53
49
  var n2 = "object" == typeof e2 ? e2 : {};
54
50
  return n2.date = t2, n2.args = arguments, new _(n2);
55
51
  }, b = v;
@@ -64,12 +60,9 @@ var dayjs_min = { exports: {} };
64
60
  return m2.parse = function(t2) {
65
61
  this.$d = function(t3) {
66
62
  var e2 = t3.date, n2 = t3.utc;
67
- if (null === e2)
68
- return /* @__PURE__ */ new Date(NaN);
69
- if (b.u(e2))
70
- return /* @__PURE__ */ new Date();
71
- if (e2 instanceof Date)
72
- return new Date(e2);
63
+ if (null === e2) return /* @__PURE__ */ new Date(NaN);
64
+ if (b.u(e2)) return /* @__PURE__ */ new Date();
65
+ if (e2 instanceof Date) return new Date(e2);
73
66
  if ("string" == typeof e2 && !/Z$/i.test(e2)) {
74
67
  var r2 = e2.match($);
75
68
  if (r2) {
@@ -133,8 +126,7 @@ var dayjs_min = { exports: {} };
133
126
  if (o2 === c || o2 === h) {
134
127
  var y2 = this.clone().set(d, 1);
135
128
  y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
136
- } else
137
- l2 && this.$d[l2]($2);
129
+ } else l2 && this.$d[l2]($2);
138
130
  return this.init(), this;
139
131
  }, m2.set = function(t2, e2) {
140
132
  return this.clone().$set(t2, e2);
@@ -147,22 +139,17 @@ var dayjs_min = { exports: {} };
147
139
  var e2 = O(l2);
148
140
  return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
149
141
  };
150
- if ($2 === c)
151
- return this.set(c, this.$M + r2);
152
- if ($2 === h)
153
- return this.set(h, this.$y + r2);
154
- if ($2 === a)
155
- return y2(1);
156
- if ($2 === o)
157
- return y2(7);
142
+ if ($2 === c) return this.set(c, this.$M + r2);
143
+ if ($2 === h) return this.set(h, this.$y + r2);
144
+ if ($2 === a) return y2(1);
145
+ if ($2 === o) return y2(7);
158
146
  var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
159
147
  return b.w(m3, this);
160
148
  }, m2.subtract = function(t2, e2) {
161
149
  return this.add(-1 * t2, e2);
162
150
  }, m2.format = function(t2) {
163
151
  var e2 = this, n2 = this.$locale();
164
- if (!this.isValid())
165
- return n2.invalidDate || l;
152
+ if (!this.isValid()) return n2.invalidDate || l;
166
153
  var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
167
154
  return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
168
155
  }, d2 = function(t3) {
@@ -266,8 +253,7 @@ var dayjs_min = { exports: {} };
266
253
  }, m2.$locale = function() {
267
254
  return D[this.$L];
268
255
  }, m2.locale = function(t2, e2) {
269
- if (!t2)
270
- return this.$L;
256
+ if (!t2) return this.$L;
271
257
  var n2 = this.clone(), r2 = w(t2, e2, true);
272
258
  return r2 && (n2.$L = r2), n2;
273
259
  }, m2.clone = function() {
Binary file
package/lib/index.es11.js CHANGED
@@ -14,10 +14,7 @@ var __spreadValues = (a, b) => {
14
14
  }
15
15
  return a;
16
16
  };
17
- var __publicField = (obj, key, value) => {
18
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
19
- return value;
20
- };
17
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
18
  var __async = (__this, __arguments, generator) => {
22
19
  return new Promise((resolve, reject) => {
23
20
  var fulfilled = (value) => {
@@ -130,8 +127,7 @@ function findKey(obj, key) {
130
127
  return null;
131
128
  }
132
129
  const _global = (() => {
133
- if (typeof globalThis !== "undefined")
134
- return globalThis;
130
+ if (typeof globalThis !== "undefined") return globalThis;
135
131
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
136
132
  })();
137
133
  const isContextDefined = (context) => !isUndefined(context) && context !== _global;
@@ -185,8 +181,7 @@ const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
185
181
  let prop;
186
182
  const merged = {};
187
183
  destObj = destObj || {};
188
- if (sourceObj == null)
189
- return destObj;
184
+ if (sourceObj == null) return destObj;
190
185
  do {
191
186
  props = Object.getOwnPropertyNames(sourceObj);
192
187
  i = props.length;
@@ -211,13 +206,10 @@ const endsWith = (str, searchString, position) => {
211
206
  return lastIndex !== -1 && lastIndex === position;
212
207
  };
213
208
  const toArray = (thing) => {
214
- if (!thing)
215
- return null;
216
- if (isArray(thing))
217
- return thing;
209
+ if (!thing) return null;
210
+ if (isArray(thing)) return thing;
218
211
  let i = thing.length;
219
- if (!isNumber(i))
220
- return null;
212
+ if (!isNumber(i)) return null;
221
213
  const arr = new Array(i);
222
214
  while (i-- > 0) {
223
215
  arr[i] = thing[i];
@@ -273,8 +265,7 @@ const freezeMethods = (obj) => {
273
265
  return false;
274
266
  }
275
267
  const value = obj[name];
276
- if (!isFunction(value))
277
- return;
268
+ if (!isFunction(value)) return;
278
269
  descriptor.enumerable = false;
279
270
  if ("writable" in descriptor) {
280
271
  descriptor.writable = false;
@@ -472,8 +463,7 @@ function removeBrackets(key) {
472
463
  return utils.endsWith(key, "[]") ? key.slice(0, -2) : key;
473
464
  }
474
465
  function renderKey(path, key, dots) {
475
- if (!path)
476
- return key;
466
+ if (!path) return key;
477
467
  return path.concat(key).map(function each(token, i) {
478
468
  token = removeBrackets(token);
479
469
  return !dots && i ? "[" + token + "]" : token;
@@ -507,8 +497,7 @@ function toFormData(obj, formData, options) {
507
497
  throw new TypeError("visitor must be a function");
508
498
  }
509
499
  function convertValue(value) {
510
- if (value === null)
511
- return "";
500
+ if (value === null) return "";
512
501
  if (utils.isDate(value)) {
513
502
  return value.toISOString();
514
503
  }
@@ -551,8 +540,7 @@ function toFormData(obj, formData, options) {
551
540
  isVisitable
552
541
  });
553
542
  function build(value, path) {
554
- if (utils.isUndefined(value))
555
- return;
543
+ if (utils.isUndefined(value)) return;
556
544
  if (stack.indexOf(value) !== -1) {
557
545
  throw Error("Circular reference detected in " + path.join("."));
558
546
  }
@@ -892,7 +880,6 @@ utils.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
892
880
  utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
893
881
  defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
894
882
  });
895
- const defaults$1 = defaults;
896
883
  const ignoreDuplicateOf = utils.toObjectSet([
897
884
  "age",
898
885
  "authorization",
@@ -965,8 +952,7 @@ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
965
952
  if (isHeaderNameFilter) {
966
953
  value = header;
967
954
  }
968
- if (!utils.isString(value))
969
- return;
955
+ if (!utils.isString(value)) return;
970
956
  if (utils.isString(filter2)) {
971
957
  return value.indexOf(filter2) !== -1;
972
958
  }
@@ -1145,11 +1131,10 @@ class AxiosHeaders {
1145
1131
  AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1146
1132
  utils.freezeMethods(AxiosHeaders.prototype);
1147
1133
  utils.freezeMethods(AxiosHeaders);
1148
- const AxiosHeaders$1 = AxiosHeaders;
1149
1134
  function transformData(fns, response) {
1150
- const config2 = this || defaults$1;
1135
+ const config2 = this || defaults;
1151
1136
  const context = response || config2;
1152
- const headers = AxiosHeaders$1.from(context.headers);
1137
+ const headers = AxiosHeaders.from(context.headers);
1153
1138
  let data = context.data;
1154
1139
  utils.forEach(fns, function transform(fn) {
1155
1140
  data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0);
@@ -1340,7 +1325,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
1340
1325
  const xhrAdapter = isXHRAdapterSupported && function(config2) {
1341
1326
  return new Promise(function dispatchXhrRequest(resolve, reject) {
1342
1327
  let requestData = config2.data;
1343
- const requestHeaders = AxiosHeaders$1.from(config2.headers).normalize();
1328
+ const requestHeaders = AxiosHeaders.from(config2.headers).normalize();
1344
1329
  const responseType = config2.responseType;
1345
1330
  let onCanceled;
1346
1331
  function done() {
@@ -1367,7 +1352,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config2) {
1367
1352
  if (!request) {
1368
1353
  return;
1369
1354
  }
1370
- const responseHeaders = AxiosHeaders$1.from(
1355
+ const responseHeaders = AxiosHeaders.from(
1371
1356
  "getAllResponseHeaders" in request && request.getAllResponseHeaders()
1372
1357
  );
1373
1358
  const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
@@ -1525,7 +1510,7 @@ function throwIfCancellationRequested(config2) {
1525
1510
  }
1526
1511
  function dispatchRequest(config2) {
1527
1512
  throwIfCancellationRequested(config2);
1528
- config2.headers = AxiosHeaders$1.from(config2.headers);
1513
+ config2.headers = AxiosHeaders.from(config2.headers);
1529
1514
  config2.data = transformData.call(
1530
1515
  config2,
1531
1516
  config2.transformRequest
@@ -1533,7 +1518,7 @@ function dispatchRequest(config2) {
1533
1518
  if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
1534
1519
  config2.headers.setContentType("application/x-www-form-urlencoded", false);
1535
1520
  }
1536
- const adapter = adapters.getAdapter(config2.adapter || defaults$1.adapter);
1521
+ const adapter = adapters.getAdapter(config2.adapter || defaults.adapter);
1537
1522
  return adapter(config2).then(function onAdapterResolution(response) {
1538
1523
  throwIfCancellationRequested(config2);
1539
1524
  response.data = transformData.call(
@@ -1541,7 +1526,7 @@ function dispatchRequest(config2) {
1541
1526
  config2.transformResponse,
1542
1527
  response
1543
1528
  );
1544
- response.headers = AxiosHeaders$1.from(response.headers);
1529
+ response.headers = AxiosHeaders.from(response.headers);
1545
1530
  return response;
1546
1531
  }, function onAdapterRejection(reason) {
1547
1532
  if (!isCancel(reason)) {
@@ -1552,13 +1537,13 @@ function dispatchRequest(config2) {
1552
1537
  config2.transformResponse,
1553
1538
  reason.response
1554
1539
  );
1555
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
1540
+ reason.response.headers = AxiosHeaders.from(reason.response.headers);
1556
1541
  }
1557
1542
  }
1558
1543
  return Promise.reject(reason);
1559
1544
  });
1560
1545
  }
1561
- const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
1546
+ const headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;
1562
1547
  function mergeConfig(config1, config2) {
1563
1548
  config2 = config2 || {};
1564
1549
  const config3 = {};
@@ -1743,7 +1728,7 @@ class Axios {
1743
1728
  delete headers[method];
1744
1729
  }
1745
1730
  );
1746
- config2.headers = AxiosHeaders$1.concat(contextHeaders, headers);
1731
+ config2.headers = AxiosHeaders.concat(contextHeaders, headers);
1747
1732
  const requestInterceptorChain = [];
1748
1733
  let synchronousRequestInterceptors = true;
1749
1734
  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
@@ -1827,7 +1812,6 @@ utils.forEach(["post", "put", "patch"], function forEachMethodWithData2(method)
1827
1812
  Axios.prototype[method] = generateHTTPMethod();
1828
1813
  Axios.prototype[method + "Form"] = generateHTTPMethod(true);
1829
1814
  });
1830
- const Axios$1 = Axios;
1831
1815
  class CancelToken {
1832
1816
  constructor(executor) {
1833
1817
  if (typeof executor !== "function") {
@@ -1839,8 +1823,7 @@ class CancelToken {
1839
1823
  });
1840
1824
  const token = this;
1841
1825
  this.promise.then((cancel) => {
1842
- if (!token._listeners)
1843
- return;
1826
+ if (!token._listeners) return;
1844
1827
  let i = token._listeners.length;
1845
1828
  while (i-- > 0) {
1846
1829
  token._listeners[i](cancel);
@@ -1915,7 +1898,6 @@ class CancelToken {
1915
1898
  };
1916
1899
  }
1917
1900
  }
1918
- const CancelToken$1 = CancelToken;
1919
1901
  function spread(callback) {
1920
1902
  return function wrap(arr) {
1921
1903
  return callback.apply(null, arr);
@@ -1992,21 +1974,20 @@ const HttpStatusCode = {
1992
1974
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
1993
1975
  HttpStatusCode[value] = key;
1994
1976
  });
1995
- const HttpStatusCode$1 = HttpStatusCode;
1996
1977
  function createInstance(defaultConfig) {
1997
- const context = new Axios$1(defaultConfig);
1998
- const instance = bind(Axios$1.prototype.request, context);
1999
- utils.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
1978
+ const context = new Axios(defaultConfig);
1979
+ const instance = bind(Axios.prototype.request, context);
1980
+ utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });
2000
1981
  utils.extend(instance, context, null, { allOwnKeys: true });
2001
1982
  instance.create = function create(instanceConfig) {
2002
1983
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
2003
1984
  };
2004
1985
  return instance;
2005
1986
  }
2006
- const axios = createInstance(defaults$1);
2007
- axios.Axios = Axios$1;
1987
+ const axios = createInstance(defaults);
1988
+ axios.Axios = Axios;
2008
1989
  axios.CanceledError = CanceledError;
2009
- axios.CancelToken = CancelToken$1;
1990
+ axios.CancelToken = CancelToken;
2010
1991
  axios.isCancel = isCancel;
2011
1992
  axios.VERSION = VERSION;
2012
1993
  axios.toFormData = toFormData;
@@ -2018,9 +1999,9 @@ axios.all = function all(promises) {
2018
1999
  axios.spread = spread;
2019
2000
  axios.isAxiosError = isAxiosError;
2020
2001
  axios.mergeConfig = mergeConfig;
2021
- axios.AxiosHeaders = AxiosHeaders$1;
2002
+ axios.AxiosHeaders = AxiosHeaders;
2022
2003
  axios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
2023
- axios.HttpStatusCode = HttpStatusCode$1;
2004
+ axios.HttpStatusCode = HttpStatusCode;
2024
2005
  axios.default = axios;
2025
2006
  const ttc = {
2026
2007
  LOGIN_URL: `${window.location.origin}/ttc/cloud/#/login`,
@@ -2064,8 +2045,7 @@ const getUserInfo = (systemName = "ttc") => {
2064
2045
  return userInfo;
2065
2046
  };
2066
2047
  const getUserRouteList = () => __async(void 0, null, function* () {
2067
- if (!getToken())
2068
- return [];
2048
+ if (!getToken()) return [];
2069
2049
  const data = yield getHomeMenuList();
2070
2050
  return data;
2071
2051
  });
@@ -2085,8 +2065,7 @@ const jumpToLogin = () => {
2085
2065
  const userName = window.prompt("当前系统处于开发环境,当前登录过期,请输入登录账号", "");
2086
2066
  if (userName !== null) {
2087
2067
  const password = window.prompt("请输入登录密码", "");
2088
- if (password === null || password == "")
2089
- window.prompt("请输入登录密码", "");
2068
+ if (password === null || password == "") window.prompt("请输入登录密码", "");
2090
2069
  autoLogin({ userName, password });
2091
2070
  }
2092
2071
  }
@@ -2115,8 +2094,7 @@ const isProduction = () => {
2115
2094
  return getSystemConfig("environment") === "production";
2116
2095
  };
2117
2096
  const getUserPermissions = (systemName, isJumpLogin = true, serverName) => __async(void 0, null, function* () {
2118
- if (!getToken() && isJumpLogin)
2119
- return jumpToLogin();
2097
+ if (!getToken() && isJumpLogin) return jumpToLogin();
2120
2098
  try {
2121
2099
  const { data } = yield getAuthRouteList(serverName);
2122
2100
  const systemPermissionList = data.filter((route) => route.routeTag.includes(systemName));
@@ -2153,8 +2131,7 @@ const getUserRouter = (userMenuList, viewModules, viewConfig) => {
2153
2131
  };
2154
2132
  const getUserIsHaveBtnPower = (routeTag) => {
2155
2133
  var _a;
2156
- if (!routeTag)
2157
- return false;
2134
+ if (!routeTag) return false;
2158
2135
  const authButtonListGet = (_a = sessionStorage.getItem("ttcUserBtnList")) != null ? _a : "[]";
2159
2136
  return JSON.parse(authButtonListGet).includes(routeTag);
2160
2137
  };
@@ -2197,8 +2174,7 @@ const showFullScreenLoading = () => {
2197
2174
  needLoadingRequestCount++;
2198
2175
  };
2199
2176
  const hideFullScreenLoading = () => {
2200
- if (needLoadingRequestCount <= 0)
2201
- return;
2177
+ if (needLoadingRequestCount <= 0) return;
2202
2178
  needLoadingRequestCount--;
2203
2179
  if (needLoadingRequestCount === 0) {
2204
2180
  endLoading();
@@ -2221,28 +2197,28 @@ const config = {
2221
2197
  const checkStatus = (status, msg) => {
2222
2198
  switch (status) {
2223
2199
  case 400:
2224
- ElMessage.error(msg || "请求失败!请您稍后重试");
2200
+ ElMessage.error("请求失败!请您稍后重试");
2225
2201
  break;
2226
2202
  case 401:
2227
2203
  if (!location.href.includes(getLoginUrl())) {
2228
- ElMessage.error(msg || "登录失效!请您重新登录");
2204
+ ElMessage.error("登录失效!请您重新登录");
2229
2205
  jumpToLogin();
2230
2206
  }
2231
2207
  break;
2232
2208
  case 403:
2233
- ElMessage.error(msg || "当前账号无权限访问!");
2209
+ ElMessage.error("当前账号无权限访问!");
2234
2210
  break;
2235
2211
  case 404:
2236
2212
  ElMessage.error("你所访问的资源不存在!");
2237
2213
  break;
2238
2214
  case 405:
2239
- ElMessage.error(msg || "请求方式错误!请您稍后重试");
2215
+ ElMessage.error("请求方式错误!请您稍后重试");
2240
2216
  break;
2241
2217
  case 408:
2242
- ElMessage.error(msg || "请求超时!请您稍后重试");
2218
+ ElMessage.error("请求超时!请您稍后重试");
2243
2219
  break;
2244
2220
  case 500:
2245
- ElMessage.error(msg || "服务异常!");
2221
+ ElMessage.error("服务异常!");
2246
2222
  break;
2247
2223
  case 502:
2248
2224
  ElMessage.error("网关错误!");
Binary file
package/lib/index.es12.js CHANGED
@@ -1,9 +1,6 @@
1
1
  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
- var __publicField = (obj, key, value) => {
4
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- return value;
6
- };
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
4
  const notifyMessageToSystems = (message) => {
8
5
  const themeBc = new BroadcastChannel("YXUSE_BC");
9
6
  themeBc.postMessage(message);
@@ -15,8 +12,7 @@ const receiveMessage = (callback) => {
15
12
  };
16
13
  };
17
14
  const getSelectOptions = (arr, labelKey, valueKey, isValueToNumber) => {
18
- if (!Array.isArray(arr))
19
- return [];
15
+ if (!Array.isArray(arr)) return [];
20
16
  return arr.map((item) => {
21
17
  return {
22
18
  label: item == null ? void 0 : item[labelKey],
@@ -171,8 +167,7 @@ class YxSubscribe {
171
167
  }
172
168
  unsubscribe(sub, fn) {
173
169
  const subscribers = this.subscribers[sub];
174
- if (!fn)
175
- return this.subscribers[sub] = [];
170
+ if (!fn) return this.subscribers[sub] = [];
176
171
  if (subscribers) {
177
172
  const index = subscribers.indexOf(fn);
178
173
  if (index !== -1) {