@arkxos/arkos-core 0.1.0

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 (62) hide show
  1. package/README.md +36 -0
  2. package/ark_dist/ark-meta.json +45 -0
  3. package/ark_dist/css/370.fbd21c4a.css +65 -0
  4. package/ark_dist/index.html +23 -0
  5. package/ark_dist/js/370.b7feb826.js +3 -0
  6. package/ark_dist/js/370.b7feb826.js.LICENSE.txt +16 -0
  7. package/ark_dist/js/370.b7feb826.js.map +1 -0
  8. package/ark_dist/js/app.87081276.js +1 -0
  9. package/ark_proxy/entry.js +48 -0
  10. package/ark_proxy_es/entry.js +18 -0
  11. package/package.json +114 -0
  12. package/scripts/check.js +13 -0
  13. package/scripts/meta.js +21 -0
  14. package/scripts/prepublishOnly.js +28 -0
  15. package/src/App.vue +25 -0
  16. package/src/access/tokenStorage.ts +10 -0
  17. package/src/api/index.js +13 -0
  18. package/src/api/model/auth.js +88 -0
  19. package/src/api/model/common.js +49 -0
  20. package/src/api/model/demo.js +56 -0
  21. package/src/api/model/system.js +114 -0
  22. package/src/api/systemApi.js +16 -0
  23. package/src/assets/logo.png +0 -0
  24. package/src/components/HelloWorld.vue +40 -0
  25. package/src/components/index.ts +12 -0
  26. package/src/configs/subApp.ts +9 -0
  27. package/src/core/api/http.ts +490 -0
  28. package/src/core/apitest/axios_config.js +10 -0
  29. package/src/core/apitest/index.js +10 -0
  30. package/src/core/apitest/mock/user.js +10 -0
  31. package/src/core/config/index.js +84 -0
  32. package/src/core/config/myConfig.js +14 -0
  33. package/src/core/i18n/i18nBuilder.ts +41 -0
  34. package/src/core/puzzle/readme.txt +4 -0
  35. package/src/core/router/router.js +80 -0
  36. package/src/core/system.ts +312 -0
  37. package/src/directive/authDirective.ts +61 -0
  38. package/src/directive/index.ts +16 -0
  39. package/src/entrance/libProperties.ts +57 -0
  40. package/src/entrance/libTypes.ts +47 -0
  41. package/src/enums/LanguageEnum.ts +5 -0
  42. package/src/hooks/message.ts +81 -0
  43. package/src/lang/en_US.ts +28 -0
  44. package/src/lang/index.ts +73 -0
  45. package/src/lang/zh_CN.ts +27 -0
  46. package/src/loadApp.ts +4 -0
  47. package/src/main.ts +16 -0
  48. package/src/plugins/access.ts +88 -0
  49. package/src/plugins/accessPlugin.ts +76 -0
  50. package/src/plugins/acl/index.js +24 -0
  51. package/src/plugins/priv.ts +23 -0
  52. package/src/shims-vue.d.ts +6 -0
  53. package/src/store/index.ts +22 -0
  54. package/src/store/modules/systemStore.ts +31 -0
  55. package/src/types/axios.d.ts +13 -0
  56. package/src/types/func.ts +14 -0
  57. package/src/types/global.d.ts +108 -0
  58. package/src/types/layout.d.ts +59 -0
  59. package/src/types/mitt.d.ts +42 -0
  60. package/src/types/pinia.d.ts +94 -0
  61. package/src/types/views.d.ts +27 -0
  62. package/src/utils/mitt.ts +8 -0
@@ -0,0 +1,73 @@
1
+ // 自定义国际化配置
2
+ import { createI18n } from 'vue-i18n';
3
+ import { useStorage } from '@vueuse/core'
4
+ // import { zhCn, en } from 'element-plus'
5
+ // import zhCn from "element-plus/es/locale/lang/zh-cn"
6
+ // import en from "element-plus/es/locale/lang/en"
7
+ // 本地语言包
8
+ import enUSLocale from './en_US';
9
+ import zhCNLocale from './zh_CN';
10
+ import { LanguageEnum } from '../enums/LanguageEnum';
11
+ import arkOsUtil from '@arkxos/arkos-util';
12
+
13
+ // element plus 自带国际化
14
+ // import enLocale from 'element-plus/es/locale/lang/en';
15
+ // import zhcnLocale from 'element-plus/es/locale/lang/zh-cn';
16
+
17
+ // 定义变量内容
18
+ // import myZhCn from './lang/zh-cn.js'
19
+ // import myEn from './lang/en.js'
20
+ // const messages = {};
21
+ const messages = {
22
+ 'zh-cn': {
23
+ // el: zhCn,
24
+ // ...myZhCn
25
+ },
26
+ en: {
27
+ // el: en,
28
+ // ...myEn
29
+ }
30
+ }
31
+ const element = {};// { en: enLocale, 'zh-cn': zhcnLocale };
32
+ const itemize = { en: [] as any[], 'zh-cn': [] as any[] };
33
+
34
+ // const messages = {
35
+ // zh_CN: {
36
+ // ...zhCNLocale
37
+ // },
38
+ // en_US: {
39
+ // ...enUSLocale
40
+ // }
41
+ // };
42
+
43
+ /**
44
+ * 获取当前语言
45
+ * @returns zh-cn|en ...
46
+ */
47
+ // 读取 pinia 默认语言
48
+ // const stores = useThemeConfig(pinia);
49
+ // const { themeConfig } = storeToRefs(stores);
50
+ export const getLanguage = (): LanguageEnum => {
51
+ const language = useStorage<LanguageEnum>('language', LanguageEnum.zh_CN);
52
+ if (language.value) {
53
+ return language.value;
54
+ }
55
+ return LanguageEnum.zh_CN;
56
+ };
57
+
58
+ const i18n = createI18n({
59
+ legacy: false,
60
+ silentTranslationWarn: true,
61
+ missingWarn: false,
62
+ silentFallbackWarn: true,
63
+ fallbackWarn: false,
64
+ // locale: getLanguage(),
65
+ locale: arkOsUtil.tool.data.get('APP_LANG') || 'zh-cn', // config?.LANG,
66
+ fallbackLocale: 'zh-cn',
67
+ // locale: themeConfig.value.globalI18n,
68
+ globalInjection: true, // 全局注册$t方法
69
+ messages
70
+ });
71
+
72
+ console.log('i18n instance', i18n)
73
+ export default i18n;
@@ -0,0 +1,27 @@
1
+ export default {
2
+ // 路由国际化
3
+ route: {
4
+ dashboard: '首页',
5
+ document: '项目文档'
6
+ },
7
+ // 登录页面国际化
8
+ login: {
9
+ username: '用户名',
10
+ password: '密码',
11
+ login: '登 录',
12
+ code: '请输入验证码',
13
+ copyright: ''
14
+ },
15
+ navbar: {
16
+ full: '全屏',
17
+ language: '语言',
18
+ dashboard: '首页',
19
+ document: '项目文档',
20
+ message: '消息',
21
+ layoutSize: '布局大小',
22
+ selectTenant: '选择租户',
23
+ layoutSetting: '布局设置',
24
+ personalCenter: '个人中心',
25
+ logout: '退出登录'
26
+ }
27
+ };
package/src/loadApp.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+
4
+ createApp(App).mount('#app')
package/src/main.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { isMasterApp } from '@arkxio/ark-iso'
2
+ import { libReady } from '@arkxio/ark-lib-proxy'
3
+ import { LIB_NAME } from './configs/subApp'
4
+ import { preFetchLib } from '@arkxio/ark-micro';
5
+
6
+ (async function () {
7
+ const libProperties = await import('./entrance/libProperties')
8
+ // 注意此处传递的是 default
9
+ libReady(LIB_NAME, libProperties.default)
10
+
11
+ // 非子应用时(即不是被别的模块触发载入的情况),自己挂载渲染节点,方便本地调试
12
+ // 可根据项目实际情况控制是否载入 loadApp 文件
13
+ // if (isMasterApp()) {
14
+ // await import('./loadApp')
15
+ // }
16
+ }()).catch(console.error)
@@ -0,0 +1,88 @@
1
+ import api from '../api'
2
+ import { tool } from '@arkxos/arkos-util'
3
+ import systemStore from '../store/modules/systemStore';
4
+ import { setToken } from '../access/tokenStorage'
5
+ import system from '../core/system'
6
+ // import cache from "@arkxos/arkos-util/src/utils/cache";
7
+
8
+ const access = {
9
+ getToken (data) {
10
+ return new Promise((resolve, reject) => {
11
+ api.auth.token.post(data).then((response) => {
12
+ const token = response.access_token;
13
+ setToken(token, {
14
+ expires: 24 * 60 * 60
15
+ })
16
+
17
+ const _systemStore = systemStore();
18
+ _systemStore.setToken(token)
19
+
20
+ resolve(token);
21
+ }).catch(reject);
22
+ })
23
+ },
24
+ async refreshUserInfo() {
25
+ return new Promise((resolve, reject) => {
26
+ api.auth.account.post().then((response) => {
27
+ console.log('accountResponseData', response)
28
+ const userInfo = response.data;
29
+ tool.data.set('PERMISSIONS', userInfo.permissions)
30
+ tool.data.set('roles', userInfo.roles)
31
+
32
+ userInfo.user = userInfo.sysUser;
33
+ tool.data.set('USER_INFO', userInfo)
34
+
35
+ const _systemStore = systemStore();
36
+ _systemStore.setUserInfo(userInfo);
37
+
38
+ // 获取菜单
39
+ // if(this.form.user == 'admin'){
40
+ // menu = await this.$API.system.menu.myMenus.get()
41
+ // } else {
42
+ // menu = await this.$API.demo.menu.get()
43
+ // }
44
+
45
+ console.log('查询菜单')
46
+ system.queryMenus().then((response) => {
47
+ console.log('query menu', response)
48
+ const menu = response
49
+ if (menu) {
50
+ if (menu.length == 0) {
51
+ reject('当前用户无任何菜单权限,请联系系统管理员');
52
+ return;
53
+
54
+ // let menuData = []
55
+ //
56
+ // menu.data.forEach(item=>{
57
+ // menuData.push(item)
58
+ // })
59
+ //
60
+ // allUserMenuData.forEach(item=>{
61
+ // menuData.push(item)
62
+ // })
63
+ //
64
+ // const username = userInfo.data.user.userName.trim()
65
+ // if('admin' == username) {
66
+ // staticMenuData.data.menu.forEach(item=>{
67
+ // menuData.push(item)
68
+ // })
69
+ // }
70
+ //
71
+ //
72
+ // this.fixMenuPath(menuData)
73
+ // this.$TOOL.data.set("MENU", menuData)
74
+ // console.log('==========================')
75
+ // this.$TOOL.data.set("PERMISSIONS", userInfo.data.permissions)
76
+ // console.log(this.$TOOL.data.get("PERMISSIONS"))
77
+ // this.$TOOL.data.set("DASHBOARDGRID", []) // menu.data.dashboardGrid)
78
+ }
79
+ }
80
+
81
+ resolve(userInfo);
82
+ }).catch(reject);
83
+ }).catch(reject);
84
+ })
85
+ }
86
+ }
87
+
88
+ export default access;
@@ -0,0 +1,76 @@
1
+ import { tool } from '@arkxos/arkos-util'
2
+ import access from './access'
3
+ import acl from './acl';
4
+ import system from '../core/system'
5
+ import { getToken } from '../access/tokenStorage';
6
+ import systemStore from '../store/modules/systemStore';
7
+
8
+ const whiteList = ['/login', '/register', '/social-callback'];
9
+
10
+ const accessPlugin = {
11
+ name: 'accessPlugin',
12
+ app: undefined,
13
+ install (app) {
14
+ app.use(acl);
15
+ this.app = app;
16
+ console.log('app acl', app.$acl)
17
+ app.config.globalProperties.$access = access;
18
+ },
19
+ uninstall () {
20
+ console.log('uninstall')
21
+ },
22
+ beforeRouter (to, from, next) {
23
+ console.log('from', from, 'to', to)
24
+
25
+ if (to.path === '/login') {
26
+ // 删除路由(替换当前layout路由)
27
+ // router.addRoute(routes[0])
28
+ next();
29
+ // next({ path: '/' })
30
+ return false;
31
+ } else if (whiteList.indexOf(to.path as string) !== -1) {
32
+ next();
33
+ } else {
34
+ // 有token
35
+ const token = getToken();
36
+ if (token) {
37
+ const mySystemStore = systemStore();
38
+ console.log('mySystemStore', mySystemStore)
39
+ if (!mySystemStore.userInfo['user'] && system.themeRootRoute) {
40
+ access.refreshUserInfo().then(() => {
41
+ next();
42
+ });
43
+ }
44
+ // access.login({}, getToken()).then(res => {
45
+ // // token过期
46
+ // if (!res.data) {
47
+ // next(`/login?redirect=${to.fullPath}`)
48
+ // return false;
49
+ // } else {
50
+ // system.queryMenus().then(() => {
51
+ // next();
52
+ // });
53
+ // }
54
+ // }).catch(() => {
55
+ // next(`/login?redirect=${to.fullPath}`)
56
+ // return false;
57
+ // })
58
+ } else {
59
+ const integrate = to.query && to.query.integrate === 'true'
60
+ if (!this.app.config.globalProperties.$acl.permission('is-login')) {
61
+ if (integrate) {
62
+ access.refreshUserInfo().then(() => {
63
+ next();
64
+ });
65
+ } else {
66
+ // next({ path: '/login' });
67
+ next(`/login?redirect=${to.fullPath}`); // 否则全部重定向到登录页
68
+ return false;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+
76
+ export default accessPlugin
@@ -0,0 +1,24 @@
1
+ // Import router if you are using the middleware on Vue Router
2
+ import router from '../../core/router/router';
3
+ // Import store if you are using reactive Store/Pinia/Vuex as User data source
4
+ import systemStore from '../../store/modules/systemStore';
5
+ import { computed } from 'vue'; // For VUE 3
6
+ import { createAcl, defineAclRules } from 'vue-simple-acl';
7
+
8
+ const userInfo =
9
+ computed(() => systemStore().userInfo);
10
+
11
+ const rules = () => defineAclRules((setRule) => {
12
+ // Define a simple rule for ability with no argument
13
+ setRule('is-login', (user) => user.token);
14
+ setRule('is-admin', (user) => user.is_admin);
15
+ });
16
+
17
+ const simpleAcl = createAcl({
18
+ userInfo, // short for user: user
19
+ rules, // short for rules: rules
20
+ router, // OPTIONAL, short for router: router
21
+ // other optional vue-simple-acl options here... See Vue Simple ACL Options below
22
+ });
23
+
24
+ export default simpleAcl;
@@ -0,0 +1,23 @@
1
+ import { tool } from '@arkxos/arkos-util';
2
+ import systemStore from '../store/modules/systemStore';
3
+
4
+ export const hasPriv = (value): any => {
5
+ const stores = systemStore();
6
+ const permissions = stores.userInfo.permissions;
7
+
8
+ if (value && value instanceof Array && value.length > 0) {
9
+ const hasPermission = permissions.some((permi: string) => {
10
+ // console.log('permi === \'*:*:*\'', permi === '*:*:*', permi)
11
+ return permi === '*:*:*' || value.includes(permi);
12
+ });
13
+ return hasPermission;
14
+ }
15
+ if (value) {
16
+ const hasPermission = permissions.some((permi: string) => {
17
+ // console.log('permi === \'*:*:*\'', permi === '*:*:*', permi)
18
+ return permi === '*:*:*' || value === permi;
19
+ });
20
+ return hasPermission;
21
+ }
22
+ return false;
23
+ };
@@ -0,0 +1,6 @@
1
+ /* eslint-disable */
2
+ declare module '*.vue' {
3
+ import type { DefineComponent } from 'vue'
4
+ const component: DefineComponent<{}, {}, any>
5
+ export default component
6
+ }
@@ -0,0 +1,22 @@
1
+ // import Vue from "vue";
2
+ // import Vuex from "vuex";
3
+ // // 模块
4
+ // import core from "./modules/core";
5
+ //
6
+ // Vue.use(Vuex);
7
+ // const store = new Vuex.Store({
8
+ // modules: {
9
+ // core
10
+ // }
11
+ // });
12
+ // export default store;
13
+ // https://pinia.vuejs.org/
14
+ import { createPinia } from 'pinia';
15
+ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
16
+
17
+ // 创建
18
+ const pinia = createPinia();
19
+ pinia.use(piniaPluginPersistedstate);
20
+
21
+ // 导出
22
+ export default pinia;
@@ -0,0 +1,31 @@
1
+ import { defineStore } from 'pinia'
2
+
3
+ const systemStore = defineStore('system', {
4
+ state: () => ({
5
+ userInfo: {
6
+ permissions: []
7
+ },
8
+ token: '',
9
+ menus: []
10
+ }),
11
+ actions: {
12
+ setUserInfo (userInfo) {
13
+ this.userInfo = userInfo;
14
+ },
15
+ setToken (token) {
16
+ this.token = token;
17
+ },
18
+ setMenus (menus) {
19
+ this.menus = menus;
20
+ }
21
+ },
22
+ // mutations: {
23
+ // SET_USER: (state, user) => (state.user = user),
24
+ // SET_MENUS: (state, menus) => (state.menus = menus)
25
+ // },
26
+ // getters: {
27
+ // user: state => state.user,
28
+ // menus: state => state.menus
29
+ // }
30
+ });
31
+ export default systemStore;
@@ -0,0 +1,13 @@
1
+ /* eslint-disable */
2
+ import * as axios from 'axios';
3
+
4
+ // 扩展 axios 数据返回类型,可自行扩展
5
+ declare module 'axios' {
6
+ export interface AxiosResponse<T = any> {
7
+ code: number;
8
+ data: T;
9
+ message: string;
10
+ type?: string;
11
+ [key: string]: T;
12
+ }
13
+ }
@@ -0,0 +1,14 @@
1
+ // 定义全局属性的类型
2
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
3
+ import { ComponentCustomProperties } from 'vue';
4
+
5
+ // declare module '@vue/runtime-core' {
6
+ // interface ComponentCustomProperties {
7
+ // parseTime: Function;
8
+ // parseDate: Function;
9
+ // dateTimeStr: string;
10
+ // dateStr: string;
11
+ // timeStr: string;
12
+ // baseURL: string;
13
+ // }
14
+ // }
@@ -0,0 +1,108 @@
1
+ // 申明外部 npm 插件模块
2
+ declare module 'splitpanes';
3
+ declare module 'js-cookie';
4
+ declare module '@wangeditor/editor-for-vue';
5
+ declare module 'qs';
6
+
7
+ // 声明一个模块,防止引入文件时报错
8
+ declare module '*.json';
9
+ declare module '*.png';
10
+ declare module '*.jpg';
11
+ declare module '*.scss';
12
+ declare module '*.ts';
13
+ declare module '*.js';
14
+
15
+ // 声明文件,*.vue 后缀的文件交给 vue 模块来处理
16
+ declare module '*.vue' {
17
+ import type { DefineComponent } from 'vue';
18
+ const component: DefineComponent<{}, {}, any>;
19
+ export default component;
20
+ }
21
+
22
+ // 声明文件,定义全局变量
23
+ /* eslint-disable */
24
+ declare interface Window {
25
+ nextLoading: boolean;
26
+ }
27
+
28
+ // 声明路由当前项类型
29
+ declare type RouteItem<T = any> = {
30
+ path: string;
31
+ name?: string | symbol | undefined | null;
32
+ redirect?: string;
33
+ k?: T;
34
+ meta?: {
35
+ title?: string;
36
+ isLink?: string;
37
+ isHide?: boolean;
38
+ isKeepAlive?: boolean;
39
+ isAffix?: boolean;
40
+ isIframe?: boolean;
41
+ roles?: string[];
42
+ icon?: string;
43
+ isDynamic?: boolean;
44
+ isDynamicPath?: string;
45
+ isIframeOpen?: string;
46
+ loading?: boolean;
47
+ };
48
+ children: T[];
49
+ query?: { [key: string]: T };
50
+ params?: { [key: string]: T };
51
+ contextMenuClickId?: string | number;
52
+ commonUrl?: string;
53
+ isFnClick?: boolean;
54
+ url?: string;
55
+ transUrl?: string;
56
+ title?: string;
57
+ id?: string | number;
58
+ };
59
+
60
+ // 声明路由 to from
61
+ declare interface RouteToFrom<T = any> extends RouteItem {
62
+ path?: string;
63
+ children?: T[];
64
+ }
65
+
66
+ // 声明路由当前项类型集合
67
+ declare type RouteItems<T extends RouteItem = any> = T[];
68
+
69
+ // 声明 ref
70
+ declare type RefType<T = any> = T | null;
71
+
72
+ // 声明 HTMLElement
73
+ declare type HtmlType = HTMLElement | string | undefined | null;
74
+
75
+ // 申明 children 可选
76
+ declare type ChilType<T = any> = {
77
+ children?: T[];
78
+ };
79
+
80
+ // 申明 数组
81
+ declare type EmptyArrayType<T = any> = T[];
82
+
83
+ // 申明 对象
84
+ declare type EmptyObjectType<T = any> = {
85
+ [key: string]: T;
86
+ };
87
+
88
+ // 申明 select option
89
+ declare type SelectOptionType = {
90
+ value: string | number;
91
+ label: string | number;
92
+ };
93
+
94
+ // 鼠标滚轮滚动类型
95
+ declare interface WheelEventType extends WheelEvent {
96
+ wheelDelta: number;
97
+ }
98
+
99
+ // table 数据格式公共类型
100
+ declare interface TableType<T = any> {
101
+ total: number;
102
+ loading: boolean;
103
+ param: {
104
+ pageNum: number;
105
+ pageSize: number;
106
+ [key: string]: T;
107
+ };
108
+ }
@@ -0,0 +1,59 @@
1
+ // aside
2
+ declare type AsideState = {
3
+ menuList: RouteRecordRaw[];
4
+ clientWidth: number;
5
+ };
6
+
7
+ // columnsAside
8
+ declare type ColumnsAsideState<T = any> = {
9
+ columnsAsideList: T[];
10
+ liIndex: number;
11
+ liOldIndex: null | number;
12
+ liHoverIndex: null | number;
13
+ liOldPath: null | string;
14
+ difference: number;
15
+ routeSplit: string[];
16
+ };
17
+
18
+ // navBars breadcrumb
19
+ declare type BreadcrumbState<T = any> = {
20
+ breadcrumbList: T[];
21
+ routeSplit: string[];
22
+ routeSplitFirst: string;
23
+ routeSplitIndex: number;
24
+ };
25
+
26
+ // navBars search
27
+ declare type SearchState<T = any> = {
28
+ isShowSearch: boolean;
29
+ menuQuery: string;
30
+ tagsViewList: T[];
31
+ };
32
+
33
+ // navBars tagsView
34
+ declare type TagsViewState<T = any> = {
35
+ routeActive: string | T;
36
+ routePath: string | unknown;
37
+ dropdown: {
38
+ x: string | number;
39
+ y: string | number;
40
+ };
41
+ sortable: T;
42
+ tagsRefsIndex: number;
43
+ tagsViewList: T[];
44
+ tagsViewRoutesList: T[];
45
+ };
46
+
47
+ // navBars parent
48
+ declare type ParentViewState<T = any> = {
49
+ refreshRouterViewKey: string;
50
+ iframeRefreshKey: string;
51
+ keepAliveNameList: string[];
52
+ iframeList: T[];
53
+ };
54
+
55
+ // navBars link
56
+ declare type LinkViewState = {
57
+ title: string;
58
+ isLink: string;
59
+ };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * mitt 事件类型定义
3
+ *
4
+ * @method openSetingsDrawer 打开布局设置弹窗
5
+ * @method restoreDefault 分栏布局,鼠标移入、移出数据显示
6
+ * @method setSendColumnsChildren 分栏布局,鼠标移入、移出菜单数据传入到 navMenu 下的菜单中
7
+ * @method setSendClassicChildren 经典布局,开启切割菜单时,菜单数据传入到 navMenu 下的菜单中
8
+ * @method getBreadcrumbIndexSetFilterRoutes 布局设置弹窗,开启切割菜单时,菜单数据传入到 navMenu 下的菜单中
9
+ * @method layoutMobileResize 浏览器窗口改变时,用于适配移动端界面显示
10
+ * @method openOrCloseSortable 布局设置弹窗,开启 TagsView 拖拽
11
+ * @method openShareTagsView 布局设置弹窗,开启 TagsView 共用
12
+ * @method onTagsViewRefreshRouterView tagsview 刷新界面
13
+ * @method onCurrentContextmenuClick tagsview 右键菜单每项点击时
14
+ * @method updateWartermark 更新水印显示内容
15
+ */
16
+ declare type MittType<T = any> = {
17
+ openSetingsDrawer?: string;
18
+ restoreDefault?: string;
19
+ setSendColumnsChildren: T;
20
+ setSendClassicChildren: T;
21
+ getBreadcrumbIndexSetFilterRoutes?: string;
22
+ layoutMobileResize: T;
23
+ openOrCloseSortable?: string;
24
+ openShareTagsView?: string;
25
+ onTagsViewRefreshRouterView?: T;
26
+ onCurrentContextmenuClick?: T;
27
+ updateWartermark?: T;
28
+ };
29
+
30
+ // mitt 参数类型定义
31
+ declare type LayoutMobileResize = {
32
+ layout: string;
33
+ clientWidth: number;
34
+ };
35
+
36
+ // mitt 参数菜单类型
37
+ declare type MittMenu = {
38
+ children: RouteRecordRaw[];
39
+ item?: RouteItem;
40
+ };
41
+
42
+