qdt-admin-layout 1.0.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.
- package/LICENSE +21 -0
- package/README.md +22 -0
- package/package.json +45 -0
- package/src/component/Aside/DefaultSidebar/index.vue +354 -0
- package/src/component/Aside/DefaultSidebar/style.scss +32 -0
- package/src/component/Aside/index.vue +30 -0
- package/src/component/Aside/style.scss +23 -0
- package/src/component/Aside/theme-dark.scss +19 -0
- package/src/component/Aside/theme-light.scss +18 -0
- package/src/component/Breadcrumb/index.vue +111 -0
- package/src/component/Breadcrumb/style.scss +27 -0
- package/src/component/CachedRouterView/index.vue +162 -0
- package/src/component/ContextMenu/functionalUse.js +26 -0
- package/src/component/ContextMenu/index.vue +140 -0
- package/src/component/ContextMenu/style.scss +30 -0
- package/src/component/ElMenu/item.vue +66 -0
- package/src/component/ElMenu/mixin.js +36 -0
- package/src/component/ElMenu/sub.vue +118 -0
- package/src/component/Hamburger/index.vue +27 -0
- package/src/component/Hamburger/style.scss +3 -0
- package/src/component/Header/index.vue +131 -0
- package/src/component/Header/style.scss +74 -0
- package/src/component/Header/theme-dark.scss +31 -0
- package/src/component/Header/theme-light.scss +15 -0
- package/src/component/HorizontalResizableMenu/GhostMenu.vue +101 -0
- package/src/component/HorizontalResizableMenu/index.vue +280 -0
- package/src/component/HorizontalScroller/index.vue +91 -0
- package/src/component/HorizontalScroller/style.scss +12 -0
- package/src/component/Layout/index.vue +153 -0
- package/src/component/Layout/style.scss +42 -0
- package/src/component/LoadingSpinner/index.vue +17 -0
- package/src/component/Logo/index.vue +41 -0
- package/src/component/Logo/style.scss +26 -0
- package/src/component/NavMenu/index.vue +206 -0
- package/src/component/NavMenu/style.scss +159 -0
- package/src/component/NavMenu/theme-dark.scss +59 -0
- package/src/component/NavMenu/theme-light.scss +81 -0
- package/src/component/Page/content.vue +58 -0
- package/src/component/Page/iframe.vue +63 -0
- package/src/component/Page/index.vue +22 -0
- package/src/component/Page/style.scss +48 -0
- package/src/component/Redirect/index.vue +19 -0
- package/src/component/TagsView/index.vue +255 -0
- package/src/component/TagsView/style.scss +51 -0
- package/src/component/TagsView/util.js +67 -0
- package/src/config/const.js +24 -0
- package/src/config/defaultRoute.js +23 -0
- package/src/config/index.js +4 -0
- package/src/config/logic.js +53 -0
- package/src/helper.js +43 -0
- package/src/index.js +15 -0
- package/src/mixin/menu.js +72 -0
- package/src/store/app.js +132 -0
- package/src/store/aside.js +92 -0
- package/src/store/header.js +37 -0
- package/src/store/index.js +20 -0
- package/src/store/page.js +67 -0
- package/src/store/tagsView.js +186 -0
- package/src/store/util.js +35 -0
- package/src/style/index.scss +23 -0
- package/src/style/maxViewHeight.scss +65 -0
- package/src/style/transition.scss +71 -0
- package/src/style/var.scss +81 -0
- package/src/util.js +69 -0
- package/types/config.d.ts +12 -0
- package/types/helper.d.ts +10 -0
- package/types/index.d.ts +5 -0
- package/types/menu.d.ts +17 -0
- package/types/route.d.ts +15 -0
- package/types/store.d.ts +156 -0
- package/types/vue-router.d.ts +7 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* 过渡动画 */
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//路由过渡动画
|
|
5
|
+
.right-out,
|
|
6
|
+
.left-out {
|
|
7
|
+
&-leave-active,
|
|
8
|
+
&-enter-active {
|
|
9
|
+
transition: transform .2s, opacity .2s;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.right-out {
|
|
14
|
+
&-enter {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
transform: translateX(-30px);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-leave-to {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
transform: translateX(30px);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.left-out {
|
|
26
|
+
&-enter {
|
|
27
|
+
opacity: 0;
|
|
28
|
+
transform: translateX(30px);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&-leave-to {
|
|
32
|
+
opacity: 0;
|
|
33
|
+
transform: translateX(-30px);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
//面包屑切换动画
|
|
39
|
+
.breadcrumb {
|
|
40
|
+
&-enter-active,
|
|
41
|
+
&-leave-active,
|
|
42
|
+
&-move {
|
|
43
|
+
transition: transform .5s, opacity .5s;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-enter,
|
|
47
|
+
&-leave-active {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transform: translateX(20px);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&-leave-active {
|
|
53
|
+
position: absolute;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
//侧边栏切换动画
|
|
59
|
+
.sidebar-enter-active {
|
|
60
|
+
transition: all 0.2s;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sidebar-enter,
|
|
64
|
+
.sidebar-leave-active {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
transform: translateY(30px) skewY(10deg)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.sidebar-leave-active {
|
|
70
|
+
position: absolute;
|
|
71
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@import "~element-ui/packages/theme-chalk/src/common/var.scss";
|
|
2
|
+
|
|
3
|
+
//移动端的最大宽度
|
|
4
|
+
//值变动时需同时修改../config/const.js maxMobileWidth
|
|
5
|
+
$max-mobile-width: 500px !default;
|
|
6
|
+
|
|
7
|
+
//logo的宽高
|
|
8
|
+
$logo-size: 30px !default;
|
|
9
|
+
|
|
10
|
+
//菜单中icon的大小
|
|
11
|
+
$menu-icon-size: 16px !default;
|
|
12
|
+
//菜单中icon和文字的距离
|
|
13
|
+
$menu-icon-text-gap: 10px !default;
|
|
14
|
+
//菜单的padding
|
|
15
|
+
//值变动时需同时修改../store/aside.js inlineIndent
|
|
16
|
+
$menu-padding: $menu-icon-size + $menu-icon-text-gap !default;
|
|
17
|
+
//暗色菜单的背景色
|
|
18
|
+
$menu-background-dark: #304156 !default;
|
|
19
|
+
//暗色子级菜单的背景色
|
|
20
|
+
$sub-menu-background-dark: darken($menu-background-dark, 5%) !default;
|
|
21
|
+
//亮色菜单的文字颜色
|
|
22
|
+
$menu-text-color-light: $--color-text-primary !default;
|
|
23
|
+
//暗色菜单的文字颜色
|
|
24
|
+
$menu-text-color-dark: rgba(255, 255, 255, 0.65) !default;
|
|
25
|
+
//亮色菜单的文字hover颜色
|
|
26
|
+
$menu-text-hover-color-light: $--color-primary !default;
|
|
27
|
+
//暗色菜单的文字hover颜色
|
|
28
|
+
$menu-text-hover-color-dark: $--color-white !default;
|
|
29
|
+
|
|
30
|
+
//侧边栏宽度
|
|
31
|
+
$aside-width: 208px !default;
|
|
32
|
+
//侧边栏折叠时的宽度
|
|
33
|
+
$aside-collapse-width: $menu-icon-size + $menu-padding * 2 !default;
|
|
34
|
+
|
|
35
|
+
//顶栏高度
|
|
36
|
+
$header-height: 60px !default;
|
|
37
|
+
//顶栏的padding-left
|
|
38
|
+
$header-padding-left: 12px !default;
|
|
39
|
+
//暗色顶栏的背景色
|
|
40
|
+
$header-background-dark: #1f293d !default;
|
|
41
|
+
//亮色顶栏的功能项颜色
|
|
42
|
+
$header-item-color-light: $menu-text-color-light !default;
|
|
43
|
+
//暗色顶栏的功能项颜色
|
|
44
|
+
$header-item-color-dark: rgba(255, 255, 255, 0.85) !default;
|
|
45
|
+
//亮色顶栏的功能项hover背景颜色
|
|
46
|
+
$header-item-hover-color-light: rgba(0, 0, 0, 0.025) !default;
|
|
47
|
+
//暗色顶栏的功能项hover背景颜色
|
|
48
|
+
$header-item-hover-color-dark: lighten($header-background-dark, 5%) !default;
|
|
49
|
+
//主要用于区分侧边栏、顶栏、页签栏的阴影,不建议修改
|
|
50
|
+
$header-z-index: 10 !default;
|
|
51
|
+
|
|
52
|
+
//页签栏高度
|
|
53
|
+
$tags-view-height: 32px !default;
|
|
54
|
+
//页签栏背景色
|
|
55
|
+
$tags-view-background-color: #f0f2f5 !default;
|
|
56
|
+
//页签栏阴影
|
|
57
|
+
$tags-view-shadow: inset 0 0 3px 2px hsla(0, 0%, 39.2%, 0.1) !default;
|
|
58
|
+
//页签字体大小
|
|
59
|
+
$tags-view-item-font-size: $--font-size-extra-small !default;
|
|
60
|
+
//页签边框
|
|
61
|
+
$tags-view-item-border: 1px solid $--border-color-base !default;
|
|
62
|
+
//页签圆角大小
|
|
63
|
+
$tags-view-item-border-radius: 3px !default;
|
|
64
|
+
//页签padding
|
|
65
|
+
$tags-view-item-padding: 0 12px !default;
|
|
66
|
+
//页签之间的距离
|
|
67
|
+
$tags-view-item-between: 8px !default;
|
|
68
|
+
|
|
69
|
+
//页面背景色
|
|
70
|
+
$page-background-color: #f0f2f5 !default;
|
|
71
|
+
//页头高度,用于max-view-height
|
|
72
|
+
$page-header-height: 44px !default;
|
|
73
|
+
//页头的上下padding
|
|
74
|
+
$page-header-padding: 12px !default;
|
|
75
|
+
//路由页面的margin
|
|
76
|
+
$page-view-margin: 24px !default;
|
|
77
|
+
//页脚高度,用于max-view-height
|
|
78
|
+
$page-footer-height: 64px !default;
|
|
79
|
+
|
|
80
|
+
//暗色边框的颜色,用于nav-menu和侧边栏
|
|
81
|
+
$--border-color-dark: darken($header-background-dark, 5%) !default;
|
package/src/util.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断是否为空值,undefined、null、'' 都视为空值
|
|
3
|
+
*
|
|
4
|
+
* @param str 不定参数
|
|
5
|
+
* @return {boolean} 若为空值,返回true,否则返回false
|
|
6
|
+
*/
|
|
7
|
+
export function isEmpty(...str) {
|
|
8
|
+
return str.some(i => i === undefined || i === null || i === '')
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 防抖
|
|
13
|
+
*
|
|
14
|
+
* @param func {function} 原函数
|
|
15
|
+
* @param wait {number} 防抖间隔,单位毫秒
|
|
16
|
+
* @param immediate {boolean} 是否立即执行一次
|
|
17
|
+
* @return {function} 经过防抖包装后的函数
|
|
18
|
+
*/
|
|
19
|
+
export function debounce(func, wait = 100, immediate = false) {
|
|
20
|
+
let timeout, args, context, timestamp, result
|
|
21
|
+
|
|
22
|
+
const later = function() {
|
|
23
|
+
// 据上一次触发时间间隔
|
|
24
|
+
const last = new Date().getTime() - timestamp
|
|
25
|
+
|
|
26
|
+
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
|
|
27
|
+
if (last < wait && last > 0) {
|
|
28
|
+
timeout = window.setTimeout(later, wait - last)
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
timeout = null
|
|
32
|
+
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
|
|
33
|
+
if (!immediate) {
|
|
34
|
+
result = func.apply(context, args)
|
|
35
|
+
if (!timeout) context = args = null
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return function() {
|
|
41
|
+
context = this
|
|
42
|
+
args = arguments
|
|
43
|
+
timestamp = new Date().getTime()
|
|
44
|
+
const callNow = immediate && !timeout
|
|
45
|
+
// 如果延时不存在,重新设定延时
|
|
46
|
+
if (!timeout) timeout = window.setTimeout(later, wait)
|
|
47
|
+
if (callNow) {
|
|
48
|
+
result = func.apply(context, args)
|
|
49
|
+
context = args = null
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return result
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 以深度优先找到根节点的第一个叶子节点,并判断是否有其他的叶子节点
|
|
58
|
+
*
|
|
59
|
+
* @param node
|
|
60
|
+
* @param hasOtherLeaf
|
|
61
|
+
* @returns {{hasOtherLeaf: boolean, leaf: ({children}|*)}|*}
|
|
62
|
+
*/
|
|
63
|
+
export function findFirstLeaf(node, hasOtherLeaf = false) {
|
|
64
|
+
if (!node || !node.children || node.children.length === 0) {
|
|
65
|
+
return { leaf: node, hasOtherLeaf }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return findFirstLeaf(node.children[0], hasOtherLeaf || node.children.length > 1)
|
|
69
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Vue, { ComponentOptions, AsyncComponent } from 'vue'
|
|
2
|
+
import { RouteConfig } from 'vue-router'
|
|
3
|
+
|
|
4
|
+
type Component = ComponentOptions<Vue> | typeof Vue | AsyncComponent
|
|
5
|
+
|
|
6
|
+
export declare const Const: {
|
|
7
|
+
maxMobileWidth: number
|
|
8
|
+
redirectPath: string
|
|
9
|
+
}
|
|
10
|
+
export declare const injectDefaultRoute: {
|
|
11
|
+
(layout: Component): RouteConfig[]
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import VueRouter, { Route, RawLocation } from 'vue-router'
|
|
2
|
+
|
|
3
|
+
export declare const refreshPage: {
|
|
4
|
+
(router: VueRouter, route?: Route, replace?: boolean): Promise<Route>
|
|
5
|
+
}
|
|
6
|
+
export declare const closeCurrentPage: {
|
|
7
|
+
(router: VueRouter): void
|
|
8
|
+
|
|
9
|
+
(router: VueRouter, next: RawLocation): Promise<Route>
|
|
10
|
+
}
|
package/types/index.d.ts
ADDED
package/types/menu.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface MenuItemMeta {
|
|
2
|
+
title: string
|
|
3
|
+
sort?: number
|
|
4
|
+
icon?: string
|
|
5
|
+
affix?: boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface MenuItem {
|
|
9
|
+
fullPath: string
|
|
10
|
+
meta: MenuItemMeta
|
|
11
|
+
children?: MenuItem[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface StoreMenuItem extends MenuItem {
|
|
15
|
+
parent: StoreMenuItem
|
|
16
|
+
children?: StoreMenuItem[]
|
|
17
|
+
}
|
package/types/route.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Route } from 'vue-router'
|
|
2
|
+
|
|
3
|
+
export interface RouteMeta {
|
|
4
|
+
[k: string]: any
|
|
5
|
+
|
|
6
|
+
title?: string
|
|
7
|
+
dynamicTitle?: (route: Route) => string
|
|
8
|
+
pageHeader?: boolean
|
|
9
|
+
pageFooter?: boolean
|
|
10
|
+
noCache?: boolean
|
|
11
|
+
activeMenu?: string
|
|
12
|
+
iframe?: string
|
|
13
|
+
usePathKey?: boolean
|
|
14
|
+
useFullPathKey?: boolean
|
|
15
|
+
}
|
package/types/store.d.ts
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { CreateElement, VNode } from 'vue'
|
|
2
|
+
import { Route, RawLocation } from 'vue-router'
|
|
3
|
+
import { MenuItem, MenuItemMeta, StoreMenuItem } from './menu'
|
|
4
|
+
import { RouteMeta } from './route'
|
|
5
|
+
|
|
6
|
+
type Mutation<T> = (val: T) => void
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
interface AppGetters {
|
|
10
|
+
isMobile: boolean
|
|
11
|
+
title: string
|
|
12
|
+
logo: string
|
|
13
|
+
logoRoute: RawLocation
|
|
14
|
+
onLogoClick: (e: Event) => any
|
|
15
|
+
logoSlot: (h: CreateElement, param?: { img: VNode, title: VNode, props: object }) => VNode | VNode[]
|
|
16
|
+
showLogo: boolean
|
|
17
|
+
activeRootMenu: string
|
|
18
|
+
menus: StoreMenuItem[]
|
|
19
|
+
loadingMenu: boolean
|
|
20
|
+
struct: 'top-bottom' | 'left-right'
|
|
21
|
+
navMode: 'aside' | 'mix' | 'head'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type BaseAppMutations = { [K in keyof AppGetters]: Mutation<AppGetters[K]> }
|
|
25
|
+
|
|
26
|
+
type AppMutations = Omit<BaseAppMutations, 'menus'> & {
|
|
27
|
+
menus: Mutation<MenuItem[]>
|
|
28
|
+
modifyMenuMeta: (fullPath: string, meta: MenuItemMeta) => void
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
interface AsideGetters {
|
|
33
|
+
show: boolean
|
|
34
|
+
theme: 'light' | 'dark'
|
|
35
|
+
uniqueOpen: boolean
|
|
36
|
+
collapse: boolean
|
|
37
|
+
showParentOnCollapse: boolean
|
|
38
|
+
showHamburger: boolean
|
|
39
|
+
autoHide: boolean
|
|
40
|
+
alwaysRender: boolean
|
|
41
|
+
postMenus: (menus: StoreMenuItem[]) => MenuItem[]
|
|
42
|
+
inlineIndent: number
|
|
43
|
+
switchTransitionName: string
|
|
44
|
+
defaultOpeneds: string[]
|
|
45
|
+
defaultSlot: (h: CreateElement) => VNode
|
|
46
|
+
headerSlot: (h: CreateElement, logo: VNode) => VNode | VNode[]
|
|
47
|
+
footerSlot: (h: CreateElement, hamburger: VNode) => VNode | VNode[]
|
|
48
|
+
menuIconSlot: (h: CreateElement, { menu: MenuItem, depth: number }) => VNode
|
|
49
|
+
menuContentSlot: (h: CreateElement, { menu: MenuItem, depth: number }) => VNode
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type BaseAsideMutations = { [K in keyof AsideGetters]: Mutation<AsideGetters[K]> }
|
|
53
|
+
|
|
54
|
+
type AsideMutations = BaseAsideMutations & {
|
|
55
|
+
open(): void
|
|
56
|
+
close(): void
|
|
57
|
+
switch(action?: 'open' | 'close'): void
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
interface DropdownItem {
|
|
62
|
+
icon?: string
|
|
63
|
+
content: string
|
|
64
|
+
handler: (e: Event) => any
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface HeaderGetters {
|
|
68
|
+
theme: 'light' | 'dark'
|
|
69
|
+
showCollapseIcon: boolean
|
|
70
|
+
avatar: string
|
|
71
|
+
username: string
|
|
72
|
+
dropdownItems: DropdownItem[]
|
|
73
|
+
dropdownItemsSlot: (h: CreateElement) => VNode[]
|
|
74
|
+
leftSlot: (h: CreateElement, [logo, hamburger]: VNode[]) => VNode | VNode[]
|
|
75
|
+
centerSlot: (h: CreateElement, [headMenu]: VNode[]) => VNode | VNode[]
|
|
76
|
+
rightSlot: (h: CreateElement, [refreshBtn, dropdown]: VNode[]) => VNode | VNode[]
|
|
77
|
+
menuIconSlot: (h: CreateElement, { menu: MenuItem, depth: number }) => VNode
|
|
78
|
+
menuContentSlot: (h: CreateElement, { menu: MenuItem, depth: number }) => VNode
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
type HeaderMutations = { [K in keyof HeaderGetters]: Mutation<HeaderGetters[K]> }
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
interface PageGetters {
|
|
85
|
+
enableTransition: boolean;
|
|
86
|
+
transition: {
|
|
87
|
+
default?: string
|
|
88
|
+
next?: string
|
|
89
|
+
prev?: string
|
|
90
|
+
curr?: string
|
|
91
|
+
}
|
|
92
|
+
showIframe: boolean
|
|
93
|
+
currentIframe: string
|
|
94
|
+
iframeList: string[]
|
|
95
|
+
showHeader: boolean
|
|
96
|
+
showFooter: boolean
|
|
97
|
+
headerSlot: (h: CreateElement) => VNode | VNode[]
|
|
98
|
+
footerSlot: (h: CreateElement) => VNode | VNode[]
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
type BasePageMutations = { [K in keyof PageGetters]: Mutation<PageGetters[K]> }
|
|
102
|
+
|
|
103
|
+
type PageMutations = BasePageMutations & {
|
|
104
|
+
addIframe: (src: string) => void
|
|
105
|
+
delIframe: (src: string) => void
|
|
106
|
+
openIframe: (src: string) => void
|
|
107
|
+
closeIframe: (src: string, del?: boolean) => void
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
interface View extends Route {
|
|
112
|
+
meta: RouteMeta
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface VisitedView extends View {
|
|
116
|
+
key: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
interface TagsViewGetters {
|
|
120
|
+
enabled: boolean
|
|
121
|
+
enableCache: boolean
|
|
122
|
+
enableChangeTransition: boolean
|
|
123
|
+
itemSlot: (h: CreateElement, param?: { key: string, active: boolean, on?: { [k: string]: Function }, title: string, close?: Function }) => VNode
|
|
124
|
+
visitedViews: VisitedView[]
|
|
125
|
+
cachedViews: string[]
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
type BaseTagsViewMutations = { [K in keyof TagsViewGetters]: Mutation<TagsViewGetters[K]> }
|
|
129
|
+
|
|
130
|
+
type TagsViewMutations = BaseTagsViewMutations & {
|
|
131
|
+
addTagOnly: Mutation<View>
|
|
132
|
+
addCacheOnly: Mutation<View>
|
|
133
|
+
addTagAndCache: Mutation<View>
|
|
134
|
+
delTagOnly: Mutation<View>
|
|
135
|
+
delCacheOnly: Mutation<View>
|
|
136
|
+
delTagAndCache: Mutation<View>
|
|
137
|
+
delOtherTagAndCache: Mutation<View>
|
|
138
|
+
delAllCache: () => void
|
|
139
|
+
delAllTagAndCache: () => void
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
export declare const appGetters: AppGetters
|
|
144
|
+
export declare const appMutations: AppMutations
|
|
145
|
+
export declare const asideGetters: AsideGetters
|
|
146
|
+
export declare const asideMutations: AsideMutations
|
|
147
|
+
export declare const headerGetters: HeaderGetters
|
|
148
|
+
export declare const headerMutations: HeaderMutations
|
|
149
|
+
export declare const pageGetters: PageGetters
|
|
150
|
+
export declare const pageMutations: PageMutations
|
|
151
|
+
export declare const tagsViewGetters: TagsViewGetters
|
|
152
|
+
export declare const tagsViewMutations: TagsViewMutations
|
|
153
|
+
|
|
154
|
+
export function getMenuByFullPath(fullPath: string): StoreMenuItem
|
|
155
|
+
|
|
156
|
+
export function mapGetters<T, K extends keyof T>(getters: T, propsNames: K[]): { [k in K]: () => T[K] }
|