@keyblade/pro-components 1.4.5 → 1.5.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/es/components.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +22 -27
- package/es/pro-keep-alive-router-view/index.d.ts +1 -1
- package/es/pro-keep-alive-router-view/index.js +7 -8
- package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.js +18 -28
- package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue2.js +2 -2
- package/es/pro-layout/hooks.d.ts +1 -1
- package/es/pro-layout/hooks.js +87 -162
- package/es/pro-layout/index.d.ts +31 -13
- package/es/pro-layout/index.js +12 -23
- package/es/pro-layout/pro-layout.vue.d.ts +36 -15
- package/es/pro-layout/pro-layout.vue.js +154 -169
- package/es/pro-layout/pro-layout.vue2.js +2 -2
- package/es/pro-layout/pro-layout.vue3.js +2 -2
- package/es/pro-menu/index.d.ts +24 -4
- package/es/pro-menu/index.js +9 -10
- package/es/pro-menu/pro-menu.vue.d.ts +13 -1
- package/es/pro-menu/pro-menu.vue.js +101 -46
- package/es/pro-menu/pro-menu.vue2.js +2 -2
- package/es/pro-menu/pro-menu.vue3.js +5 -0
- package/es/pro-page-container/index.d.ts +82 -109
- package/es/pro-page-container/index.js +8 -10
- package/es/pro-page-container/pro-page-container.vue.d.ts +49 -79
- package/es/pro-page-container/pro-page-container.vue.js +37 -57
- package/es/pro-page-container/pro-page-container.vue2.js +2 -2
- package/es/pro-page-container/pro-page-container.vue3.js +2 -2
- package/es/{pro-breadcrumb → pro-page-header}/index.d.ts +55 -55
- package/es/pro-page-header/index.js +13 -0
- package/es/{pro-breadcrumb/pro-breadcrumb.vue.d.ts → pro-page-header/pro-page-header.vue.d.ts} +41 -41
- package/es/pro-page-header/pro-page-header.vue.js +125 -0
- package/es/pro-page-header/pro-page-header.vue2.js +4 -0
- package/es/pro-page-header/pro-page-header.vue3.js +5 -0
- package/es/pro-reuse-tabs/index.d.ts +1 -1
- package/es/pro-reuse-tabs/index.js +8 -10
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +28 -35
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue2.js +2 -2
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue3.js +2 -2
- package/es/style.css +1 -121
- package/package.json +5 -3
- package/src/index.ts +3 -3
- package/es/pro-breadcrumb/index.js +0 -16
- package/es/pro-breadcrumb/pro-breadcrumb.vue.js +0 -115
- package/es/pro-breadcrumb/pro-breadcrumb.vue2.js +0 -4
- package/es/pro-breadcrumb/pro-breadcrumb.vue3.js +0 -5
- package/es/pro-menu/pro-menu-item.vue.d.ts +0 -14
- package/es/pro-menu/pro-menu-item.vue.js +0 -103
- package/es/pro-menu/pro-menu-item.vue2.js +0 -4
- package/es/pro-menu/pro-menu-item.vue3.js +0 -5
|
@@ -1,53 +1,46 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, Fragment, renderList, createBlock } from "vue";
|
|
2
|
-
const
|
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1
|
+
import { defineComponent as p, computed as k, resolveComponent as c, openBlock as a, createElementBlock as l, normalizeClass as y, createVNode as _, withCtx as f, Fragment as v, renderList as C, createBlock as h } from "vue";
|
|
2
|
+
const g = "keyblade-pro-reuse-tabs", B = /* @__PURE__ */ p({
|
|
4
3
|
__name: "pro-reuse-tabs",
|
|
5
4
|
props: {
|
|
6
5
|
tabs: {
|
|
7
6
|
type: Array,
|
|
8
|
-
required:
|
|
7
|
+
required: !0,
|
|
9
8
|
default: () => []
|
|
10
9
|
}
|
|
11
10
|
},
|
|
12
11
|
emits: {
|
|
13
|
-
"tab-click": (
|
|
14
|
-
"tab-delete": (
|
|
12
|
+
"tab-click": (t) => !0,
|
|
13
|
+
"tab-delete": (t) => !0
|
|
15
14
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
setup(t, { emit: n }) {
|
|
16
|
+
const s = t, i = k(() => {
|
|
17
|
+
var e;
|
|
18
|
+
return ((e = s.tabs.find((o) => o.active)) == null ? void 0 : e.name) ?? void 0;
|
|
19
|
+
}), d = (e) => {
|
|
20
|
+
n("tab-click", String(e));
|
|
21
|
+
}, u = (e) => {
|
|
22
|
+
n("tab-delete", String(e));
|
|
24
23
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const _component_a_tab_pane = resolveComponent("a-tab-pane");
|
|
30
|
-
const _component_a_tabs = resolveComponent("a-tabs");
|
|
31
|
-
return openBlock(), createElementBlock("div", {
|
|
32
|
-
class: normalizeClass(prefixClsName)
|
|
24
|
+
return (e, o) => {
|
|
25
|
+
const b = c("a-tab-pane"), m = c("a-tabs");
|
|
26
|
+
return a(), l("div", {
|
|
27
|
+
class: y(g)
|
|
33
28
|
}, [
|
|
34
|
-
|
|
35
|
-
"active-key":
|
|
29
|
+
_(m, {
|
|
30
|
+
"active-key": i.value,
|
|
36
31
|
size: "mini",
|
|
37
32
|
type: "rounded",
|
|
38
|
-
editable:
|
|
33
|
+
editable: t.tabs.length > 1,
|
|
39
34
|
"hide-content": "",
|
|
40
35
|
"destroy-on-hide": "",
|
|
41
|
-
onTabClick,
|
|
42
|
-
onDelete:
|
|
36
|
+
onTabClick: d,
|
|
37
|
+
onDelete: u
|
|
43
38
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, null, 8, ["title"]);
|
|
50
|
-
}), 128))
|
|
39
|
+
default: f(() => [
|
|
40
|
+
(a(!0), l(v, null, C(t.tabs, (r) => (a(), h(b, {
|
|
41
|
+
key: r.name,
|
|
42
|
+
title: r.title
|
|
43
|
+
}, null, 8, ["title"]))), 128))
|
|
51
44
|
]),
|
|
52
45
|
_: 1
|
|
53
46
|
}, 8, ["active-key", "editable"])
|
|
@@ -56,5 +49,5 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
49
|
}
|
|
57
50
|
});
|
|
58
51
|
export {
|
|
59
|
-
|
|
52
|
+
B as default
|
|
60
53
|
};
|
package/es/style.css
CHANGED
|
@@ -1,121 +1 @@
|
|
|
1
|
-
.keyblade-pro-breadcrumb {
|
|
2
|
-
margin: 16px 0;
|
|
3
|
-
}
|
|
4
|
-
.keyblade-pro-page-container {
|
|
5
|
-
padding: 0 20px 20px 20px;
|
|
6
|
-
}
|
|
7
|
-
.keyblade-pro-layout {
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 100%;
|
|
10
|
-
}
|
|
11
|
-
.keyblade-pro-layout :global(.arco-layout-sider-trigger) {
|
|
12
|
-
border-top: 0;
|
|
13
|
-
}
|
|
14
|
-
.keyblade-pro-layout-header {
|
|
15
|
-
position: fixed;
|
|
16
|
-
top: 0;
|
|
17
|
-
left: 0;
|
|
18
|
-
width: 100%;
|
|
19
|
-
height: var(--79d837bc);
|
|
20
|
-
z-index: 100;
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: space-between;
|
|
24
|
-
padding: 0 20px;
|
|
25
|
-
background-color: var(--color-bg-2);
|
|
26
|
-
border-bottom: 1px solid var(--color-border);
|
|
27
|
-
transition: all 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
28
|
-
}
|
|
29
|
-
.keyblade-pro-layout-header-left {
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
}
|
|
34
|
-
.keyblade-pro-layout-header-left-logo {
|
|
35
|
-
height: 28px;
|
|
36
|
-
}
|
|
37
|
-
.keyblade-pro-layout-header-left-title.arco-typography {
|
|
38
|
-
margin: 0;
|
|
39
|
-
font-size: 18px;
|
|
40
|
-
}
|
|
41
|
-
.keyblade-pro-layout-sider {
|
|
42
|
-
padding-top: var(--79d837bc);
|
|
43
|
-
position: fixed;
|
|
44
|
-
top: 0;
|
|
45
|
-
left: 0;
|
|
46
|
-
z-index: 99;
|
|
47
|
-
height: 100%;
|
|
48
|
-
transition: all 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
49
|
-
}
|
|
50
|
-
.keyblade-pro-layout-sider-content {
|
|
51
|
-
position: relative;
|
|
52
|
-
height: 100%;
|
|
53
|
-
overflow: auto;
|
|
54
|
-
}
|
|
55
|
-
.keyblade-pro-layout-sider-collapsed-icon.arco-btn {
|
|
56
|
-
position: absolute;
|
|
57
|
-
right: 12px;
|
|
58
|
-
bottom: 12px;
|
|
59
|
-
}
|
|
60
|
-
.keyblade-pro-layout-body {
|
|
61
|
-
padding-top: var(--79d837bc);
|
|
62
|
-
padding-left: var(--51986431);
|
|
63
|
-
min-height: 100vh;
|
|
64
|
-
overflow-y: hidden;
|
|
65
|
-
background-color: var(--color-fill-2);
|
|
66
|
-
transition: padding 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
|
|
67
|
-
}
|
|
68
|
-
.keyblade-pro-layout-body-affix .arco-affix {
|
|
69
|
-
z-index: 98;
|
|
70
|
-
}
|
|
71
|
-
.keyblade-pro-layout-body-footer {
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: center;
|
|
75
|
-
height: 40px;
|
|
76
|
-
color: var(--color-text-2);
|
|
77
|
-
text-align: center;
|
|
78
|
-
}
|
|
79
|
-
.keyblade-pro-layout-body-collapsed {
|
|
80
|
-
padding-left: var(--2cc12c98);
|
|
81
|
-
}
|
|
82
|
-
.keyblade-pro-layout-side .keyblade-pro-layout-header {
|
|
83
|
-
z-index: 98;
|
|
84
|
-
left: var(--51986431);
|
|
85
|
-
width: calc(100% - var(--51986431));
|
|
86
|
-
}
|
|
87
|
-
.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed {
|
|
88
|
-
left: var(--2cc12c98);
|
|
89
|
-
width: calc(100% - var(--2cc12c98));
|
|
90
|
-
}
|
|
91
|
-
.keyblade-pro-layout-side .keyblade-pro-layout-sider {
|
|
92
|
-
padding-top: 0;
|
|
93
|
-
}
|
|
94
|
-
.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-top {
|
|
95
|
-
position: relative;
|
|
96
|
-
display: flex;
|
|
97
|
-
align-items: center;
|
|
98
|
-
padding: 16px;
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
101
|
-
}
|
|
102
|
-
.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-top-logo {
|
|
103
|
-
width: 28px;
|
|
104
|
-
height: auto;
|
|
105
|
-
}
|
|
106
|
-
.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-top-title.arco-typography {
|
|
107
|
-
margin: 0;
|
|
108
|
-
font-size: 18px;
|
|
109
|
-
}
|
|
110
|
-
.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-top {
|
|
111
|
-
padding: 16px 8px;
|
|
112
|
-
}
|
|
113
|
-
.keyblade-pro-reuse-tabs {
|
|
114
|
-
position: relative;
|
|
115
|
-
background-color: var(--color-bg-2);
|
|
116
|
-
padding: 4px 20px;
|
|
117
|
-
}
|
|
118
|
-
.keyblade-pro-menu-item-img {
|
|
119
|
-
width: 14px;
|
|
120
|
-
height: auto;
|
|
121
|
-
}
|
|
1
|
+
.keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout :global(.arco-layout-sider-trigger){border-top:0}.keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--db27ef1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout-header-left-logo{height:28px}.keyblade-pro-layout-header-left-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout-sider{padding-top:var(--db27ef1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout-sider-collapsed-icon.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout-body{padding-top:var(--db27ef1a);padding-left:var(--2f10394c);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout-body-collapsed{padding-left:var(--2c81e8ab)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--2f10394c);width:calc(100% - var(--2f10394c))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--2c81e8ab);width:calc(100% - var(--2c81e8ab))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-top{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-top-logo{width:28px;height:auto}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-top-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-top{padding:16px 8px}.keyblade-pro-page-container-content{padding:20px}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@keyblade/pro-components",
|
|
3
3
|
"description": "KeyBlade Pro Components",
|
|
4
4
|
"author": "yangshuai <704807396@qq.com>",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.5.0",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "es/index.js",
|
|
@@ -13,14 +13,16 @@
|
|
|
13
13
|
"README.md"
|
|
14
14
|
],
|
|
15
15
|
"publishConfig": {
|
|
16
|
+
"registry": "https://registry.npmjs.org/",
|
|
16
17
|
"access": "public"
|
|
17
18
|
},
|
|
18
19
|
"sideEffects": [
|
|
19
20
|
"*.css"
|
|
20
21
|
],
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@arco-design/web-vue": "^2.
|
|
23
|
-
"vue-router": "^4.2.4"
|
|
23
|
+
"@arco-design/web-vue": "^2.50.0",
|
|
24
|
+
"vue-router": "^4.2.4",
|
|
25
|
+
"@vueuse/core": "^10.3.0"
|
|
24
26
|
},
|
|
25
27
|
"peerDependencies": {
|
|
26
28
|
"vue": "^3.3.4"
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { App } from 'vue'
|
|
2
|
-
import {
|
|
2
|
+
import { ProPageHeader } from './pro-page-header'
|
|
3
3
|
import { ProKeepAliveRouterView } from './pro-keep-alive-router-view'
|
|
4
4
|
import { ProLayout } from './pro-layout'
|
|
5
5
|
import { ProMenu } from './pro-menu'
|
|
@@ -8,7 +8,7 @@ import { ProReuseTabs } from './pro-reuse-tabs'
|
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
10
|
install(app: App): void {
|
|
11
|
-
app.use(
|
|
11
|
+
app.use(ProPageHeader)
|
|
12
12
|
app.use(ProKeepAliveRouterView)
|
|
13
13
|
app.use(ProLayout)
|
|
14
14
|
app.use(ProMenu)
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// 按组件导出
|
|
21
|
-
export { default as
|
|
21
|
+
export { default as ProPageHeader } from './pro-page-header'
|
|
22
22
|
|
|
23
23
|
export { default as ProKeepAliveRouterView } from './pro-keep-alive-router-view'
|
|
24
24
|
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./pro-breadcrumb.vue.js";
|
|
2
|
-
import "./pro-breadcrumb.vue2.js";
|
|
3
|
-
import { Breadcrumb } from "@arco-design/web-vue";
|
|
4
|
-
import { IconApps } from "@arco-design/web-vue/es/icon";
|
|
5
|
-
const ProBreadcrumb = Object.assign(_sfc_main, {
|
|
6
|
-
install: (app) => {
|
|
7
|
-
app.use(Breadcrumb);
|
|
8
|
-
app.use(IconApps);
|
|
9
|
-
app.component("KbProBreadcrumb", _sfc_main);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const ProBreadcrumb$1 = ProBreadcrumb;
|
|
13
|
-
export {
|
|
14
|
-
ProBreadcrumb,
|
|
15
|
-
ProBreadcrumb$1 as default
|
|
16
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
const prefixClsName = "keyblade-pro-breadcrumb";
|
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
-
__name: "pro-breadcrumb",
|
|
5
|
-
props: {
|
|
6
|
-
/** 是否显示图标 */
|
|
7
|
-
showIcon: {
|
|
8
|
-
type: Boolean,
|
|
9
|
-
required: false,
|
|
10
|
-
default: true
|
|
11
|
-
},
|
|
12
|
-
/** 图标类型 */
|
|
13
|
-
icon: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: false,
|
|
16
|
-
default: "icon-apps"
|
|
17
|
-
},
|
|
18
|
-
/** 面包屑项目 */
|
|
19
|
-
items: {
|
|
20
|
-
type: Array,
|
|
21
|
-
required: false,
|
|
22
|
-
default: () => []
|
|
23
|
-
},
|
|
24
|
-
/** 是否显示标题 */
|
|
25
|
-
showTitle: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
required: false,
|
|
28
|
-
default: true
|
|
29
|
-
},
|
|
30
|
-
/** 标题,不传默认展示面包屑标题最后一项 */
|
|
31
|
-
title: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false,
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
/** 副标题,不传默认不展示 */
|
|
37
|
-
subTitle: {
|
|
38
|
-
type: String,
|
|
39
|
-
required: false,
|
|
40
|
-
default: ""
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
setup(__props) {
|
|
44
|
-
const props = __props;
|
|
45
|
-
const proBreadcrumbItems = inject("ProBreadcrumbItems", []);
|
|
46
|
-
const breadcrumbItems = computed(() => {
|
|
47
|
-
if (props.items instanceof Array && props.items.length === 0 || !props.items) {
|
|
48
|
-
return proBreadcrumbItems.value;
|
|
49
|
-
}
|
|
50
|
-
return props.items || [];
|
|
51
|
-
});
|
|
52
|
-
return (_ctx, _cache) => {
|
|
53
|
-
const _component_a_breadcrumb_item = resolveComponent("a-breadcrumb-item");
|
|
54
|
-
const _component_a_breadcrumb = resolveComponent("a-breadcrumb");
|
|
55
|
-
const _component_a_typography_title = resolveComponent("a-typography-title");
|
|
56
|
-
const _component_a_typography_text = resolveComponent("a-typography-text");
|
|
57
|
-
return breadcrumbItems.value ? (openBlock(), createElementBlock("div", {
|
|
58
|
-
key: 0,
|
|
59
|
-
class: normalizeClass(prefixClsName)
|
|
60
|
-
}, [
|
|
61
|
-
createVNode(_component_a_breadcrumb, {
|
|
62
|
-
class: normalizeClass(`${prefixClsName}-items`)
|
|
63
|
-
}, {
|
|
64
|
-
default: withCtx(() => [
|
|
65
|
-
__props.showIcon ? (openBlock(), createBlock(_component_a_breadcrumb_item, {
|
|
66
|
-
key: 0,
|
|
67
|
-
style: { "cursor": "text" }
|
|
68
|
-
}, {
|
|
69
|
-
default: withCtx(() => [
|
|
70
|
-
(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))
|
|
71
|
-
]),
|
|
72
|
-
_: 1
|
|
73
|
-
})) : createCommentVNode("", true),
|
|
74
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(breadcrumbItems.value, (item, index) => {
|
|
75
|
-
return openBlock(), createBlock(_component_a_breadcrumb_item, {
|
|
76
|
-
key: `${item}-${index}`
|
|
77
|
-
}, {
|
|
78
|
-
default: withCtx(() => [
|
|
79
|
-
createTextVNode(toDisplayString(item), 1)
|
|
80
|
-
]),
|
|
81
|
-
_: 2
|
|
82
|
-
}, 1024);
|
|
83
|
-
}), 128))
|
|
84
|
-
]),
|
|
85
|
-
_: 1
|
|
86
|
-
}, 8, ["class"]),
|
|
87
|
-
(props == null ? void 0 : props.showTitle) ? (openBlock(), createBlock(_component_a_typography_title, {
|
|
88
|
-
key: 0,
|
|
89
|
-
heading: 6,
|
|
90
|
-
class: normalizeClass(`${prefixClsName}-title`)
|
|
91
|
-
}, {
|
|
92
|
-
default: withCtx(() => {
|
|
93
|
-
var _a, _b;
|
|
94
|
-
return [
|
|
95
|
-
createTextVNode(toDisplayString((props == null ? void 0 : props.title) || ((_b = breadcrumbItems.value) == null ? void 0 : _b[((_a = breadcrumbItems.value) == null ? void 0 : _a.length) - 1])), 1)
|
|
96
|
-
];
|
|
97
|
-
}),
|
|
98
|
-
_: 1
|
|
99
|
-
}, 8, ["class"])) : createCommentVNode("", true),
|
|
100
|
-
(props == null ? void 0 : props.subTitle) ? (openBlock(), createBlock(_component_a_typography_text, {
|
|
101
|
-
key: 1,
|
|
102
|
-
class: normalizeClass(`${prefixClsName}-subtitle`)
|
|
103
|
-
}, {
|
|
104
|
-
default: withCtx(() => [
|
|
105
|
-
createTextVNode(toDisplayString(props == null ? void 0 : props.subTitle), 1)
|
|
106
|
-
]),
|
|
107
|
-
_: 1
|
|
108
|
-
}, 8, ["class"])) : createCommentVNode("", true)
|
|
109
|
-
])) : createCommentVNode("", true);
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
export {
|
|
114
|
-
_sfc_main as default
|
|
115
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes } from 'vue';
|
|
2
|
-
import type { IProMenuItem } from './interface';
|
|
3
|
-
declare const _default: DefineComponent<{
|
|
4
|
-
item: {
|
|
5
|
-
type: PropType<IProMenuItem>;
|
|
6
|
-
required: true;
|
|
7
|
-
};
|
|
8
|
-
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
9
|
-
item: {
|
|
10
|
-
type: PropType<IProMenuItem>;
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
}>>, {}, {}>;
|
|
14
|
-
export default _default;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, createBlock, createSlots, withCtx, createTextVNode, toDisplayString, renderList, createCommentVNode, resolveDynamicComponent, normalizeClass } from "vue";
|
|
2
|
-
import { useRouter } from "vue-router";
|
|
3
|
-
const _hoisted_1 = ["src"];
|
|
4
|
-
const _hoisted_2 = ["src"];
|
|
5
|
-
const __default__ = {
|
|
6
|
-
name: "KbProMenuItem"
|
|
7
|
-
};
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
...__default__,
|
|
10
|
-
props: {
|
|
11
|
-
item: {}
|
|
12
|
-
},
|
|
13
|
-
setup(__props) {
|
|
14
|
-
const props = __props;
|
|
15
|
-
const prefixItemClsName = "keyblade-pro-menu-item";
|
|
16
|
-
const router = useRouter();
|
|
17
|
-
const iconType = computed(() => {
|
|
18
|
-
var _a;
|
|
19
|
-
const icon = (_a = props.item) == null ? void 0 : _a.icon;
|
|
20
|
-
if (icon == null ? void 0 : icon.startsWith("icon")) {
|
|
21
|
-
return "icon";
|
|
22
|
-
}
|
|
23
|
-
return "url";
|
|
24
|
-
});
|
|
25
|
-
const onMenuItemClick = (item) => {
|
|
26
|
-
if (!(item == null ? void 0 : item.path)) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (item.path.startsWith("http") || item.path.startsWith("https")) {
|
|
30
|
-
window.open(item.path);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
router.push({ path: item.path });
|
|
34
|
-
};
|
|
35
|
-
return (_ctx, _cache) => {
|
|
36
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
37
|
-
const _component_kb_pro_menu_item = resolveComponent("kb-pro-menu-item");
|
|
38
|
-
const _component_a_sub_menu = resolveComponent("a-sub-menu");
|
|
39
|
-
const _component_a_menu_item = resolveComponent("a-menu-item");
|
|
40
|
-
return _ctx.item && !_ctx.item.hideInMenu ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
41
|
-
((_a = _ctx.item) == null ? void 0 : _a.children) && ((_c = (_b = _ctx.item) == null ? void 0 : _b.children) == null ? void 0 : _c.length) > 0 ? (openBlock(), createBlock(_component_a_sub_menu, {
|
|
42
|
-
key: _ctx.item.name
|
|
43
|
-
}, createSlots({
|
|
44
|
-
title: withCtx(() => [
|
|
45
|
-
createTextVNode(toDisplayString(_ctx.item.title), 1)
|
|
46
|
-
]),
|
|
47
|
-
default: withCtx(() => {
|
|
48
|
-
var _a2, _b2;
|
|
49
|
-
return [
|
|
50
|
-
!((_a2 = _ctx.item) == null ? void 0 : _a2.hideChildrenInMenu) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(((_b2 = _ctx.item) == null ? void 0 : _b2.children) || [], (childItem) => {
|
|
51
|
-
return openBlock(), createBlock(_component_kb_pro_menu_item, {
|
|
52
|
-
key: childItem.name,
|
|
53
|
-
item: childItem
|
|
54
|
-
}, null, 8, ["item"]);
|
|
55
|
-
}), 128)) : createCommentVNode("", true)
|
|
56
|
-
];
|
|
57
|
-
}),
|
|
58
|
-
_: 2
|
|
59
|
-
}, [
|
|
60
|
-
((_d = _ctx.item) == null ? void 0 : _d.icon) ? {
|
|
61
|
-
name: "icon",
|
|
62
|
-
fn: withCtx(() => [
|
|
63
|
-
iconType.value === "icon" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.item.icon), { key: 0 })) : createCommentVNode("", true),
|
|
64
|
-
iconType.value === "url" ? (openBlock(), createElementBlock("img", {
|
|
65
|
-
key: 1,
|
|
66
|
-
class: normalizeClass(`${prefixItemClsName}-img`),
|
|
67
|
-
src: _ctx.item.icon,
|
|
68
|
-
alt: ""
|
|
69
|
-
}, null, 10, _hoisted_1)) : createCommentVNode("", true)
|
|
70
|
-
]),
|
|
71
|
-
key: "0"
|
|
72
|
-
} : void 0
|
|
73
|
-
]), 1024)) : createCommentVNode("", true),
|
|
74
|
-
!((_e = _ctx.item) == null ? void 0 : _e.children) || ((_g = (_f = _ctx.item) == null ? void 0 : _f.children) == null ? void 0 : _g.length) === 0 ? (openBlock(), createBlock(_component_a_menu_item, {
|
|
75
|
-
key: _ctx.item.name,
|
|
76
|
-
onClick: _cache[0] || (_cache[0] = ($event) => onMenuItemClick(_ctx.item))
|
|
77
|
-
}, createSlots({
|
|
78
|
-
default: withCtx(() => [
|
|
79
|
-
createTextVNode(" " + toDisplayString(_ctx.item.title), 1)
|
|
80
|
-
]),
|
|
81
|
-
_: 2
|
|
82
|
-
}, [
|
|
83
|
-
((_h = _ctx.item) == null ? void 0 : _h.icon) ? {
|
|
84
|
-
name: "icon",
|
|
85
|
-
fn: withCtx(() => [
|
|
86
|
-
iconType.value === "icon" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.item.icon), { key: 0 })) : createCommentVNode("", true),
|
|
87
|
-
iconType.value === "url" ? (openBlock(), createElementBlock("img", {
|
|
88
|
-
key: 1,
|
|
89
|
-
class: normalizeClass(`${prefixItemClsName}-img`),
|
|
90
|
-
src: _ctx.item.icon,
|
|
91
|
-
alt: ""
|
|
92
|
-
}, null, 10, _hoisted_2)) : createCommentVNode("", true)
|
|
93
|
-
]),
|
|
94
|
-
key: "0"
|
|
95
|
-
} : void 0
|
|
96
|
-
]), 1024)) : createCommentVNode("", true)
|
|
97
|
-
], 64)) : createCommentVNode("", true);
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
export {
|
|
102
|
-
_sfc_main as default
|
|
103
|
-
};
|