@fmdeui/fmui 1.0.19 → 1.0.21

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/index.mjs CHANGED
@@ -20,7 +20,7 @@ export { auth, authAll, auths, hAuth, hAuthAll, hAuths } from './packages/hooks/
20
20
  export { base64ToFile, blobToFile, dataURLtoBlob, fileToBase64, urlToBase64 } from './packages/utils/base64Conver.mjs';
21
21
  export { buildLocaleContext, buildTranslator, translate, useLocale } from './packages/hooks/useLocale.mjs';
22
22
  export { clone, isObjectValueEqual, judgementSameArr, removeDuplicate } from './packages/utils/arrayOperation.mjs';
23
- export { configureRoutes, setPathPrefix } from './packages/router/route.mjs';
23
+ export { configureRoutes, setPathPrefix, staticRoutes } from './packages/router/route.mjs';
24
24
  export { destroyIdleTimeout, initIdleTimeout, updateIdleTimeout } from './packages/hooks/idleTimeout.mjs';
25
25
  export { downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, getFileName, openWindow } from './packages/utils/download.mjs';
26
26
  export { default as en } from './packages/locale/lang/en.mjs';
@@ -1,6 +1,6 @@
1
1
  import { useClipboard } from '@vueuse/core';
2
2
  import { ElMessage } from 'element-plus';
3
- import { useI18n } from 'vue-i18n';
3
+ import { i18n } from '../locale/index.mjs';
4
4
  import '../utils/index.mjs';
5
5
  import '../stores/index.mjs';
6
6
  import '../api/index.mjs';
@@ -10,7 +10,6 @@ import { useBaseApi } from '../api/base/index.mjs';
10
10
 
11
11
  function commonFunction() {
12
12
  const themeStore = useThemeConfig();
13
- const { t } = useI18n();
14
13
  const { copy, isSupported } = useClipboard();
15
14
  const percentFormat = (row, column, cellValue) => {
16
15
  return cellValue ? `${cellValue}%` : "-";
@@ -50,11 +49,11 @@ function commonFunction() {
50
49
  reject("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u526A\u8D34\u677F API");
51
50
  } else {
52
51
  copy(text);
53
- ElMessage.success(t("message.layout.copyTextSuccess"));
52
+ ElMessage.success(i18n.global.t("message.layout.copyTextSuccess"));
54
53
  resolve(text);
55
54
  }
56
55
  } catch (e) {
57
- ElMessage.error(t("message.layout.copyTextError"));
56
+ ElMessage.error(i18n.global.t("message.layout.copyTextError"));
58
57
  reject(e);
59
58
  }
60
59
  });
@@ -2,7 +2,7 @@ import { storeToRefs } from 'pinia';
2
2
  import { useRoutesList } from '../stores/routesList.mjs';
3
3
  import { useThemeConfig } from '../stores/themeConfig.mjs';
4
4
  import { Session, Local } from '../utils/storage.mjs';
5
- export { configureRoutes, setPathPrefix } from './route.mjs';
5
+ export { configureRoutes, setPathPrefix, staticRoutes } from './route.mjs';
6
6
  import { initFrontEndControlRoutes } from './frontEnd.mjs';
7
7
  import { initBackEndControlRoutes } from './backEnd.mjs';
8
8
  export { setDynamicViewsModules } from './backEnd.mjs';
@@ -1,4 +1,4 @@
1
- import { configureRoutes, setPathPrefix } from './route';
1
+ import { configureRoutes, setPathPrefix, staticRoutes } from './route';
2
2
  import { initFrontEndControlRoutes } from './frontEnd';
3
3
  import { initBackEndControlRoutes, setDynamicViewsModules } from './backEnd';
4
4
  import { router } from './createRouter';
@@ -9,4 +9,4 @@ import { Router } from 'vue-router';
9
9
  */
10
10
  export declare function initRouter(): Router;
11
11
  export default router;
12
- export { configureRoutes, setPathPrefix, setDynamicViewsModules, initBackEndControlRoutes, initFrontEndControlRoutes };
12
+ export { configureRoutes, staticRoutes, setPathPrefix, setDynamicViewsModules, initBackEndControlRoutes, initFrontEndControlRoutes };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fmdeui-fmui v1.0.19 */
1
+ /*! fmdeui-fmui v1.0.21 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('pinia'), require('crypto-js'), require('xlsx-js-style'), require('element-plus'), require('vue'), require('@element-plus/icons-vue'), require('axios'), require('js-cookie'), require('@microsoft/signalr'), require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('vue-i18n'), require('exceljs'), require('lodash-es'), require('@vueuse/core'), require('mitt'), require('vue-router'), require('nprogress')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'pinia', 'crypto-js', 'xlsx-js-style', 'element-plus', 'vue', '@element-plus/icons-vue', 'axios', 'js-cookie', '@microsoft/signalr', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'vue-i18n', 'exceljs', 'lodash-es', '@vueuse/core', 'mitt', 'vue-router', 'nprogress'], factory) :
@@ -22340,7 +22340,6 @@
22340
22340
 
22341
22341
  function commonFunction() {
22342
22342
  const themeStore = useThemeConfig();
22343
- const { t } = vueI18n.useI18n();
22344
22343
  const { copy, isSupported } = core.useClipboard();
22345
22344
  const percentFormat = (row, column, cellValue) => {
22346
22345
  return cellValue ? `${cellValue}%` : "-";
@@ -22380,11 +22379,11 @@
22380
22379
  reject("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u526A\u8D34\u677F API");
22381
22380
  } else {
22382
22381
  copy(text);
22383
- elementPlus.ElMessage.success(t("message.layout.copyTextSuccess"));
22382
+ elementPlus.ElMessage.success(i18n.global.t("message.layout.copyTextSuccess"));
22384
22383
  resolve(text);
22385
22384
  }
22386
22385
  } catch (e) {
22387
- elementPlus.ElMessage.error(t("message.layout.copyTextError"));
22386
+ elementPlus.ElMessage.error(i18n.global.t("message.layout.copyTextError"));
22388
22387
  reject(e);
22389
22388
  }
22390
22389
  });
@@ -22597,7 +22596,7 @@
22597
22596
  }
22598
22597
  }
22599
22598
  ];
22600
- let staticRoutes = [
22599
+ exports.staticRoutes = [
22601
22600
  {
22602
22601
  path: "/login",
22603
22602
  name: "login",
@@ -22638,9 +22637,9 @@
22638
22637
  }
22639
22638
  if (options.staticRoutes) {
22640
22639
  if (options.merge) {
22641
- staticRoutes = [...staticRoutes, ...options.staticRoutes];
22640
+ exports.staticRoutes = [...exports.staticRoutes, ...options.staticRoutes];
22642
22641
  } else {
22643
- staticRoutes = options.staticRoutes;
22642
+ exports.staticRoutes = options.staticRoutes;
22644
22643
  }
22645
22644
  }
22646
22645
  if (options.notFoundAndNoPower) {
@@ -22696,7 +22695,7 @@
22696
22695
  * 2、backEnd.ts(后端控制路由)、frontEnd.ts(前端控制路由) 中也需要加 notFoundAndNoPower 404、401 界面。
22697
22696
  * 防止 404、401 不在 layout 布局中,不设置的话,404、401 界面将全屏显示
22698
22697
  */
22699
- routes: [...notFoundAndNoPower, ...staticRoutes]
22698
+ routes: [...notFoundAndNoPower, ...exports.staticRoutes]
22700
22699
  });
22701
22700
 
22702
22701
  async function initFrontEndControlRoutes() {