@fmdeui/fmui 1.0.37 → 1.0.39

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.
Files changed (41) hide show
  1. package/es/components/fm-layout/index.d.ts +10 -0
  2. package/es/components/fm-layout/src/index.vue.d.ts +4 -0
  3. package/es/hooks/other.d.ts +1 -5
  4. package/es/index.mjs +1 -0
  5. package/es/make-installer.mjs +2 -1
  6. package/es/packages/components/fm-layout/src/index.vue2.mjs +5 -1
  7. package/es/packages/components/fm-layout/src/navBars/topBar/user.vue2.mjs +3 -2
  8. package/es/packages/components/fm-layout/src/navMenu/horizontal.vue2.mjs +7 -2
  9. package/es/packages/components/fm-layout/src/navMenu/subItem.vue2.mjs +7 -2
  10. package/es/packages/components/fm-layout/src/navMenu/vertical.vue2.mjs +7 -2
  11. package/es/packages/hooks/other.mjs +8 -34
  12. package/es/packages/stores/index.mjs +1 -0
  13. package/es/stores/index.d.ts +2 -0
  14. package/index.js +144 -150
  15. package/index.min.js +6 -6
  16. package/index.min.mjs +6 -6
  17. package/index.mjs +144 -151
  18. package/lib/components/fm-layout/index.d.ts +10 -0
  19. package/lib/components/fm-layout/src/index.vue.d.ts +4 -0
  20. package/lib/hooks/other.d.ts +1 -5
  21. package/lib/index.js +2 -0
  22. package/lib/make-installer.js +2 -1
  23. package/lib/packages/components/fm-layout/src/index.vue2.js +5 -1
  24. package/lib/packages/components/fm-layout/src/navBars/topBar/user.vue2.js +3 -2
  25. package/lib/packages/components/fm-layout/src/navMenu/horizontal.vue2.js +7 -2
  26. package/lib/packages/components/fm-layout/src/navMenu/subItem.vue2.js +7 -2
  27. package/lib/packages/components/fm-layout/src/navMenu/vertical.vue2.js +7 -2
  28. package/lib/packages/hooks/other.js +6 -34
  29. package/lib/packages/stores/index.js +2 -0
  30. package/lib/stores/index.d.ts +2 -0
  31. package/locale/en.js +1 -1
  32. package/locale/en.min.js +1 -1
  33. package/locale/en.min.mjs +1 -1
  34. package/locale/en.mjs +1 -1
  35. package/locale/zh-cn.js +1 -1
  36. package/locale/zh-cn.min.js +1 -1
  37. package/locale/zh-cn.min.mjs +1 -1
  38. package/locale/zh-cn.mjs +1 -1
  39. package/package.json +1 -1
  40. /package/es/{version.css → make-installer.css} +0 -0
  41. /package/lib/{component.css → index.css} +0 -0
@@ -5,10 +5,14 @@ export declare const FLayout: {
5
5
  onLayoutChangePassword?: ((...args: any[]) => any) | undefined;
6
6
  onLayoutOnlineUsers?: ((...args: any[]) => any) | undefined;
7
7
  onLayoutSearchMenu?: ((...args: any[]) => any) | undefined;
8
+ onLayoutSetBrowserTitle?: ((...args: any[]) => any) | undefined;
9
+ onLayoutSetOpenLink?: ((...args: any[]) => any) | undefined;
8
10
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
9
11
  layoutChangePassword: (...args: any[]) => void;
10
12
  layoutOnlineUsers: (...args: any[]) => void;
11
13
  layoutSearchMenu: (...args: any[]) => void;
14
+ layoutSetBrowserTitle: (...args: any[]) => void;
15
+ layoutSetOpenLink: (...args: any[]) => void;
12
16
  }, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
13
17
  P: {};
14
18
  B: {};
@@ -20,6 +24,8 @@ export declare const FLayout: {
20
24
  onLayoutChangePassword?: ((...args: any[]) => any) | undefined;
21
25
  onLayoutOnlineUsers?: ((...args: any[]) => any) | undefined;
22
26
  onLayoutSearchMenu?: ((...args: any[]) => any) | undefined;
27
+ onLayoutSetBrowserTitle?: ((...args: any[]) => any) | undefined;
28
+ onLayoutSetOpenLink?: ((...args: any[]) => any) | undefined;
23
29
  }>, {}, {}, {}, {}, {}>;
24
30
  __isFragment?: never;
25
31
  __isTeleport?: never;
@@ -28,10 +34,14 @@ export declare const FLayout: {
28
34
  onLayoutChangePassword?: ((...args: any[]) => any) | undefined;
29
35
  onLayoutOnlineUsers?: ((...args: any[]) => any) | undefined;
30
36
  onLayoutSearchMenu?: ((...args: any[]) => any) | undefined;
37
+ onLayoutSetBrowserTitle?: ((...args: any[]) => any) | undefined;
38
+ onLayoutSetOpenLink?: ((...args: any[]) => any) | undefined;
31
39
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
32
40
  layoutChangePassword: (...args: any[]) => void;
33
41
  layoutOnlineUsers: (...args: any[]) => void;
34
42
  layoutSearchMenu: (...args: any[]) => void;
43
+ layoutSetBrowserTitle: (...args: any[]) => void;
44
+ layoutSetOpenLink: (...args: any[]) => void;
35
45
  }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
36
46
  $slots: any;
37
47
  });
@@ -10,10 +10,14 @@ declare const __VLS_component: DefineComponent<{}, {}, {}, {}, {}, ComponentOpti
10
10
  layoutChangePassword: (...args: any[]) => void;
11
11
  layoutOnlineUsers: (...args: any[]) => void;
12
12
  layoutSearchMenu: (...args: any[]) => void;
13
+ layoutSetBrowserTitle: (...args: any[]) => void;
14
+ layoutSetOpenLink: (...args: any[]) => void;
13
15
  }, string, PublicProps, Readonly<{}> & Readonly<{
14
16
  onLayoutChangePassword?: ((...args: any[]) => any) | undefined;
15
17
  onLayoutOnlineUsers?: ((...args: any[]) => any) | undefined;
16
18
  onLayoutSearchMenu?: ((...args: any[]) => any) | undefined;
19
+ onLayoutSetBrowserTitle?: ((...args: any[]) => any) | undefined;
20
+ onLayoutSetOpenLink?: ((...args: any[]) => any) | undefined;
17
21
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
18
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
23
  export default _default;
@@ -1,9 +1,8 @@
1
- import { EmptyArrayType, EmptyObjectType, RouteItem, RouteToFrom } from 'fmdeui-fmui/es/types';
1
+ import { EmptyArrayType, EmptyObjectType, RouteToFrom } from 'fmdeui-fmui/es/types';
2
2
  /**
3
3
  * 设置浏览器标题国际化
4
4
  * @method const title = useTitle(); ==> title()
5
5
  */
6
- export declare function useTitle(): void;
7
6
  /**
8
7
  * 设置 自定义 tagsView 名称、 自定义 tagsView 名称国际化
9
8
  * @param params 路由 query、params 中的 tagsViewName
@@ -43,7 +42,6 @@ export declare function handleEmpty(list: EmptyArrayType): EmptyArrayType;
43
42
  * 打开外部链接
44
43
  * @param val 当前点击项菜单
45
44
  */
46
- export declare function handleOpenLink(val: RouteItem): void;
47
45
  /**
48
46
  * 统一批量导出
49
47
  * @method elSvg 导出全局注册 element plus svg 图标
@@ -57,13 +55,11 @@ export declare function handleOpenLink(val: RouteItem): void;
57
55
  * @method handleOpenLink 打开外部链接
58
56
  */
59
57
  declare const other: {
60
- useTitle: () => void;
61
58
  setTagsViewNameI18n(route: RouteToFrom): string;
62
59
  lazyImg: (el: string, arr: EmptyArrayType) => void;
63
60
  globalComponentSize: () => string;
64
61
  deepClone: (obj: EmptyObjectType) => EmptyObjectType;
65
62
  isMobile: () => boolean;
66
63
  handleEmpty: (list: EmptyArrayType) => EmptyArrayType;
67
- handleOpenLink: (val: RouteItem) => void;
68
64
  };
69
65
  export default other;
package/es/index.mjs CHANGED
@@ -30,6 +30,7 @@ export { gcj02ToBd09, wgs84ToBd09, wgs84ToGcj02 } from './packages/utils/gpsConv
30
30
  export { hasPrivilege, hasRoleCode, isAdmin, isMember, isNormalUser, isSupperAdmin, isTenantAdmin, orgId, orgName, posId, posName, roles, tenantId, userAccount, userEmail, userFriendName, userId, userName, userPhone } from './packages/hooks/useInfo.mjs';
31
31
  export { judgementIdCard, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl } from './packages/utils/toolsValidate.mjs';
32
32
  export { loadSysInfo, updateFavicon } from './packages/hooks/sysInfo.mjs';
33
+ export { default as pinia } from './packages/stores/inpinia.mjs';
33
34
  export { provideFormEvents, useFormEvents } from './packages/hooks/composables/useDialogEvents.mjs';
34
35
  export { restartSignalR, signalR } from './packages/utils/signalR.mjs';
35
36
  export { saulVModel } from './packages/utils/saulVModel.mjs';
@@ -1,7 +1,8 @@
1
- import pinia from './packages/stores/inpinia.mjs';
1
+ import './packages/stores/index.mjs';
2
2
  import { directive } from './packages/directive/index.mjs';
3
3
  import { setupVXETable } from './packages/hooks/setupVXETableHook.mjs';
4
4
  import './packages/components/index.mjs';
5
+ import pinia from './packages/stores/inpinia.mjs';
5
6
  import { elSvg } from './packages/components/svgIcon/index.mjs';
6
7
 
7
8
  const makeInstaller = (components = []) => {
@@ -13,7 +13,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  name: "FLayout"
14
14
  },
15
15
  __name: "index",
16
- emits: ["layoutChangePassword", "layoutOnlineUsers", "layoutSearchMenu"],
16
+ emits: ["layoutChangePassword", "layoutOnlineUsers", "layoutSearchMenu", "layoutSetBrowserTitle", "layoutSetOpenLink"],
17
17
  setup(__props, { emit: __emit }) {
18
18
  const layouts = {
19
19
  defaults: defineAsyncComponent(() => import('./main/defaults.vue.mjs')),
@@ -33,6 +33,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  curMyEmit("layoutOnlineUsers");
34
34
  } else if (data.name == "searchFormMenu") {
35
35
  curMyEmit("layoutSearchMenu");
36
+ } else if (data.name == "setFBrowserTitle") {
37
+ curMyEmit("layoutSetBrowserTitle");
38
+ } else if (data.name == "setFOpenLink") {
39
+ curMyEmit("layoutSetOpenLink", data);
36
40
  }
37
41
  }
38
42
  });
@@ -11,7 +11,6 @@ import '../../../../../api/index.mjs';
11
11
  import { getCountryCode, languageList } from '../../../../../locale/index.mjs';
12
12
  import '../../../../../hooks/index.mjs';
13
13
  import emitter from '../../../../../utils/mitt.mjs';
14
- import other from '../../../../../hooks/other.mjs';
15
14
  import Push from 'push.js';
16
15
  import { useRoutesList } from '../../../../../stores/routesList.mjs';
17
16
  import { useUserInfo } from '../../../../../stores/userInfo.mjs';
@@ -150,7 +149,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
150
149
  Local.set("themeConfig", themeConfig.value);
151
150
  currentCountryCode.value = getCountryCode(lang);
152
151
  locale.value = lang;
153
- other.useTitle();
152
+ events.onFormDialogOpen({
153
+ name: "setFBrowserTitle"
154
+ });
154
155
  initI18nOrSize("globalI18n", "disabledI18n");
155
156
  refreshCurrentTabpage();
156
157
  if (lang == "en") window.$changeLang("en");
@@ -3,9 +3,10 @@ import { useRoute, onBeforeRouteUpdate } from 'vue-router';
3
3
  import { storeToRefs } from 'pinia';
4
4
  import '../../../../stores/index.mjs';
5
5
  import emitter from '../../../../utils/mitt.mjs';
6
- import other from '../../../../hooks/other.mjs';
6
+ import '../../../../hooks/index.mjs';
7
7
  import { useRoutesList } from '../../../../stores/routesList.mjs';
8
8
  import { useThemeConfig } from '../../../../stores/themeConfig.mjs';
9
+ import { useFormEvents } from '../../../../hooks/composables/useDialogEvents.mjs';
9
10
 
10
11
  const _hoisted_1 = { class: "el-menu-horizontal-warp" };
11
12
  const _hoisted_2 = ["onClick"];
@@ -65,8 +66,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
65
66
  else state.defaultActive = path;
66
67
  }
67
68
  };
69
+ const events = useFormEvents();
68
70
  const onALinkClick = (val) => {
69
- other.handleOpenLink(val);
71
+ events.onFormDialogOpen({
72
+ name: "setFOpenLink",
73
+ data: val
74
+ });
70
75
  };
71
76
  onBeforeMount(() => {
72
77
  setCurrentRouterHighlight(route);
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, renderList, createBlock, withCtx, createVNode, createElementVNode, toDisplayString, withModifiers, createTextVNode } from 'vue';
2
- import other from '../../../../hooks/other.mjs';
2
+ import '../../../../hooks/index.mjs';
3
+ import { useFormEvents } from '../../../../hooks/composables/useDialogEvents.mjs';
3
4
 
4
5
  const _hoisted_1 = ["onClick"];
5
6
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -13,11 +14,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
13
14
  },
14
15
  setup(__props) {
15
16
  const props = __props;
17
+ const events = useFormEvents();
16
18
  const chils = computed(() => {
17
19
  return props.chil;
18
20
  });
19
21
  const onALinkClick = (val) => {
20
- other.handleOpenLink(val);
22
+ events.onFormDialogOpen({
23
+ name: "setFOpenLink",
24
+ data: val
25
+ });
21
26
  };
22
27
  return (_ctx, _cache) => {
23
28
  const _component_SvgIcon = resolveComponent("SvgIcon");
@@ -2,7 +2,8 @@ import { defineComponent, defineAsyncComponent, reactive, computed, onMounted, w
2
2
  import { useRoute, onBeforeRouteUpdate } from 'vue-router';
3
3
  import { storeToRefs } from 'pinia';
4
4
  import '../../../../stores/index.mjs';
5
- import other from '../../../../hooks/other.mjs';
5
+ import '../../../../hooks/index.mjs';
6
+ import { useFormEvents } from '../../../../hooks/composables/useDialogEvents.mjs';
6
7
  import { useThemeConfig } from '../../../../stores/themeConfig.mjs';
7
8
 
8
9
  const _hoisted_1 = ["onClick"];
@@ -18,6 +19,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
18
19
  setup(__props) {
19
20
  const SubItem = defineAsyncComponent(() => import('./subItem.vue.mjs'));
20
21
  const props = __props;
22
+ const events = useFormEvents();
21
23
  const storesThemeConfig = useThemeConfig();
22
24
  const { themeConfig } = storeToRefs(storesThemeConfig);
23
25
  const route = useRoute();
@@ -39,7 +41,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
39
41
  else return path;
40
42
  };
41
43
  const onALinkClick = (val) => {
42
- other.handleOpenLink(val);
44
+ events.onFormDialogOpen({
45
+ name: "setFOpenLink",
46
+ data: val
47
+ });
43
48
  };
44
49
  onMounted(() => {
45
50
  state.defaultActive = setParentHighlight(route);
@@ -1,27 +1,9 @@
1
- import { getCurrentInstance, nextTick } from 'vue';
1
+ import { nextTick } from 'vue';
2
2
  import pinia from '../stores/inpinia.mjs';
3
3
  import { storeToRefs } from 'pinia';
4
4
  import { useThemeConfig } from '../stores/themeConfig.mjs';
5
5
  import { i18n } from '../locale/index.mjs';
6
- import { verifyUrl } from '../utils/toolsValidate.mjs';
7
6
 
8
- const { proxy } = getCurrentInstance();
9
- function useTitle() {
10
- const stores = useThemeConfig(pinia);
11
- const { themeConfig } = storeToRefs(stores);
12
- const router = proxy.$mycurRouter;
13
- nextTick(() => {
14
- let webTitle = "";
15
- let globalTitle = themeConfig.value.globalTitle;
16
- const { path, meta } = router.currentRoute.value;
17
- if (path === "/login") {
18
- webTitle = meta.title;
19
- } else {
20
- webTitle = setTagsViewNameI18n(router.currentRoute.value);
21
- }
22
- document.title = `${webTitle} - ${globalTitle}` || globalTitle;
23
- });
24
- }
25
7
  function setTagsViewNameI18n(item) {
26
8
  let tagsViewName = "";
27
9
  const { query, params, meta } = item;
@@ -97,21 +79,13 @@ function handleEmpty(list) {
97
79
  }
98
80
  return arr;
99
81
  }
100
- function handleOpenLink(val) {
101
- var _a, _b, _c;
102
- const { origin, pathname } = window.location;
103
- const router = proxy.$mycurRouter;
104
- router.push(val.path);
105
- if (verifyUrl((_a = val.meta) == null ? void 0 : _a.isLink)) window.open((_b = val.meta) == null ? void 0 : _b.isLink);
106
- else window.open(`${origin}${pathname}#${(_c = val.meta) == null ? void 0 : _c.isLink}`);
107
- }
108
82
  const other = {
109
83
  // elSvg: (app: App) => {
110
84
  // elSvg(app);
111
85
  // },
112
- useTitle: () => {
113
- useTitle();
114
- },
86
+ // useTitle: () => {
87
+ // useTitle();
88
+ // },
115
89
  setTagsViewNameI18n(route) {
116
90
  return setTagsViewNameI18n(route);
117
91
  },
@@ -129,10 +103,10 @@ const other = {
129
103
  },
130
104
  handleEmpty: (list) => {
131
105
  return handleEmpty(list);
132
- },
133
- handleOpenLink: (val) => {
134
- handleOpenLink(val);
135
106
  }
107
+ // handleOpenLink: (val: RouteItem) => {
108
+ // handleOpenLink(val);
109
+ // },
136
110
  };
137
111
 
138
- export { deepClone, other as default, globalComponentSize, handleEmpty, handleOpenLink, isMobile, lazyImg, setTagsViewNameI18n, useTitle };
112
+ export { deepClone, other as default, globalComponentSize, handleEmpty, isMobile, lazyImg, setTagsViewNameI18n };
@@ -1,3 +1,4 @@
1
+ export { default as pinia } from './inpinia.mjs';
1
2
  export { useKeepALiveNames } from './keepAliveNames.mjs';
2
3
  export { useRequestOldRoutes } from './requestOldRoutes.mjs';
3
4
  export { useRoutesList } from './routesList.mjs';
@@ -1,3 +1,5 @@
1
+ import { default as pinia } from './inpinia';
2
+ export { pinia };
1
3
  export * from './keepAliveNames';
2
4
  export * from './requestOldRoutes';
3
5
  export * from './routesList';