@ditari/bsui 1.0.2 → 1.0.4
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/dist/cjs/components/index.cjs.js +1 -1
- package/dist/cjs/components/index.d.ts +10 -2
- package/dist/cjs/components/layout/Breadcrumb.vue.cjs2.js +1 -1
- package/dist/cjs/components/layout/List.vue.cjs2.js +1 -1
- package/dist/cjs/components/layout/Main.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/Main.vue.cjs2.js +1 -1
- package/dist/cjs/components/layout/NavTabs.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/NavTabs.vue.cjs2.js +1 -1
- package/dist/cjs/components/layout/Show.vue.cjs2.js +1 -1
- package/dist/cjs/components/layout/index.cjs.js +1 -1
- package/dist/cjs/components/menu/Menu.cjs.js +1 -0
- package/dist/cjs/store/modules/User.cjs.js +1 -1
- package/dist/cjs/store/modules/User.d.ts +14 -8
- package/dist/css/index.css +1 -1
- package/dist/css/layout/style/breadcrumb.css +1 -0
- package/dist/css/layout/style/index.css +1 -0
- package/dist/css/layout/style/list.css +1 -0
- package/dist/css/layout/style/main.css +1 -0
- package/dist/css/layout/style/navtab.css +1 -0
- package/dist/css/layout/style/show.css +1 -0
- package/dist/css/menu/style/index.css +1 -1
- package/dist/esm/components/index.d.ts +10 -2
- package/dist/esm/components/index.esm.js +17 -17
- package/dist/esm/components/layout/Breadcrumb.vue.esm2.js +2 -2
- package/dist/esm/components/layout/List.vue.esm2.js +2 -2
- package/dist/esm/components/layout/Main.vue.esm.js +20 -22
- package/dist/esm/components/layout/Main.vue.esm2.js +2 -2
- package/dist/esm/components/layout/NavTabs.vue.esm.js +44 -39
- package/dist/esm/components/layout/NavTabs.vue.esm2.js +2 -2
- package/dist/esm/components/layout/Show.vue.esm2.js +2 -2
- package/dist/esm/components/layout/index.esm.js +5 -9
- package/dist/esm/components/menu/Menu.esm.js +71 -0
- package/dist/esm/store/modules/User.d.ts +14 -8
- package/dist/esm/store/modules/User.esm.js +13 -8
- package/dist/esm/style.css +1 -1
- package/dist/style/index.scss +2 -1
- package/dist/style/layout/style/breadcrumb.scss +57 -0
- package/dist/style/layout/style/index.scss +6 -0
- package/dist/style/layout/style/list.scss +26 -0
- package/dist/style/layout/style/main.scss +100 -0
- package/dist/style/layout/style/navtab.scss +118 -0
- package/dist/style/layout/style/show.scss +37 -0
- package/dist/style/menu/style/index.scss +12 -4
- package/dist/style/theme/variable.scss +23 -6
- package/package.json +7 -3
- package/src/components/index.scss +2 -1
- package/src/components/index.ts +10 -2
- package/src/components/layout/Breadcrumb.vue +0 -76
- package/src/components/layout/List.vue +1 -27
- package/src/components/layout/Main.vue +2 -102
- package/src/components/layout/NavTabs.vue +6 -95
- package/src/components/layout/Show.vue +1 -39
- package/src/components/layout/style/breadcrumb.scss +57 -0
- package/src/components/layout/style/index.scss +6 -0
- package/src/components/layout/style/list.scss +26 -0
- package/src/components/layout/style/main.scss +100 -0
- package/src/components/layout/style/navtab.scss +118 -0
- package/src/components/layout/style/show.scss +37 -0
- package/src/components/{layout/Menu.jsx → menu/Menu-bak.jsx} +36 -34
- package/src/components/menu/Menu.jsx +88 -47
- package/src/components/menu/style/index.scss +12 -4
- package/src/components/theme/variable.scss +23 -6
- package/src/store/modules/User.ts +16 -9
- package/dist/cjs/components/layout/Breadcrumb.vue.cjs3.js +0 -1
- package/dist/cjs/components/layout/List.vue.cjs3.js +0 -1
- package/dist/cjs/components/layout/Main.vue.cjs3.js +0 -1
- package/dist/cjs/components/layout/Menu.cjs.js +0 -1
- package/dist/cjs/components/layout/NavTabs.vue.cjs3.js +0 -1
- package/dist/cjs/components/layout/Show.vue.cjs3.js +0 -1
- package/dist/esm/components/layout/Breadcrumb.vue.esm3.js +0 -5
- package/dist/esm/components/layout/List.vue.esm3.js +0 -5
- package/dist/esm/components/layout/Main.vue.esm3.js +0 -5
- package/dist/esm/components/layout/Menu.esm.js +0 -52
- package/dist/esm/components/layout/NavTabs.vue.esm3.js +0 -5
- package/dist/esm/components/layout/Show.vue.esm3.js +0 -5
- /package/dist/cjs/components/{layout → menu}/Menu.d.ts +0 -0
- /package/dist/esm/components/{layout → menu}/Menu.d.ts +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@import "../../theme/variable.scss";
|
|
2
|
+
.ditari-show-layout {
|
|
3
|
+
position: relative;
|
|
4
|
+
.ant-card {
|
|
5
|
+
margin-bottom: 10px;
|
|
6
|
+
.ant-card-head {
|
|
7
|
+
padding: 10px 24px;
|
|
8
|
+
.ant-card-head-title {
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
&:last-child {
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.ditari-page-header {
|
|
17
|
+
position: sticky;
|
|
18
|
+
top: 84px;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
padding: 4px 24px;
|
|
21
|
+
transition: all 0.3s;
|
|
22
|
+
&.active {
|
|
23
|
+
box-shadow: 1px 5px 20px 2px $box-shadow-color;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.ditari-show-content {
|
|
27
|
+
}
|
|
28
|
+
.ditari-show-footer {
|
|
29
|
+
position: fixed;
|
|
30
|
+
right: 0;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
left: 200px;
|
|
33
|
+
padding: 10px;
|
|
34
|
+
background: #fff;
|
|
35
|
+
box-shadow: 0px 0px 5px 3px $box-shadow-color;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, h, ref, resolveComponent } from "vue";
|
|
2
|
-
import { useMenuStore } from "../../store
|
|
2
|
+
import { useMenuStore } from "../../store";
|
|
3
3
|
|
|
4
4
|
export default defineComponent({
|
|
5
5
|
name: "DMenu",
|
|
@@ -53,43 +53,45 @@ export default defineComponent({
|
|
|
53
53
|
return () => (
|
|
54
54
|
<a-menu
|
|
55
55
|
mode="inline"
|
|
56
|
+
theme="dark"
|
|
56
57
|
v-model:openKeys={openKeys.value}
|
|
57
58
|
v-model:selectedKeys={selectedKeys.value}
|
|
58
59
|
onClick={onClick}
|
|
59
60
|
>
|
|
60
|
-
{list.map((menu) =>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
61
|
+
{list.map((menu) => {
|
|
62
|
+
menu.children.length === 0 ? <>ok</> : <>ww</>;
|
|
63
|
+
})}
|
|
64
|
+
{/*{list.map((menu) => (*/}
|
|
65
|
+
{/* <a-sub-menu key={menu.url}>*/}
|
|
66
|
+
{/* {{*/}
|
|
67
|
+
{/* title: () => <>{menu.title}</>,*/}
|
|
68
|
+
{/* icon: () => (*/}
|
|
69
|
+
{/* <>*/}
|
|
70
|
+
{/* <span>*/}
|
|
71
|
+
{/* {menu.icon ? h(resolveComponent(menu.icon)) : undefined}*/}
|
|
72
|
+
{/* </span>*/}
|
|
73
|
+
{/* </>*/}
|
|
74
|
+
{/* ),*/}
|
|
75
|
+
{/* default: () => {*/}
|
|
76
|
+
{/* if (menu.children && menu.children.length) {*/}
|
|
77
|
+
{/* return menu.children.map((child) => {*/}
|
|
78
|
+
{/* return (*/}
|
|
79
|
+
{/* <>*/}
|
|
80
|
+
{/* {child.children ? (*/}
|
|
81
|
+
{/* renderSubMenu(child.children, menu)*/}
|
|
82
|
+
{/* ) : (*/}
|
|
83
|
+
{/* <a-menu-item key={child.url}>*/}
|
|
84
|
+
{/* {child.title}*/}
|
|
85
|
+
{/* </a-menu-item>*/}
|
|
86
|
+
{/* )}*/}
|
|
87
|
+
{/* </>*/}
|
|
88
|
+
{/* );*/}
|
|
89
|
+
{/* });*/}
|
|
90
|
+
{/* }*/}
|
|
91
|
+
{/* }*/}
|
|
92
|
+
{/* }}*/}
|
|
93
|
+
{/* </a-sub-menu>*/}
|
|
94
|
+
{/*))}*/}
|
|
93
95
|
</a-menu>
|
|
94
96
|
);
|
|
95
97
|
}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import { defineComponent, h, ref, resolveComponent } from "vue";
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, h, inject, ref, resolveComponent } from "vue";
|
|
2
|
+
import { storeToRefs } from "pinia";
|
|
3
|
+
import { MenuOutlined } from "@ant-design/icons-vue";
|
|
4
|
+
|
|
5
|
+
import { useMenuStore } from "../../store/modules/Menu";
|
|
6
|
+
import { useSettingsStore } from "../../store/modules/Settings";
|
|
3
7
|
|
|
4
8
|
export default defineComponent({
|
|
5
9
|
name: "DMenu",
|
|
6
10
|
setup() {
|
|
11
|
+
const { componentName, prop } = inject("menuIcon");
|
|
7
12
|
const { list } = useMenuStore();
|
|
13
|
+
const settingsStore = useSettingsStore();
|
|
14
|
+
|
|
15
|
+
const { getCollapsed } = storeToRefs(settingsStore);
|
|
8
16
|
// 当前展开的菜单
|
|
9
17
|
const openKeys = ref(["/labelList", "/label"]);
|
|
10
18
|
// 当前选中的菜单
|
|
@@ -30,64 +38,97 @@ export default defineComponent({
|
|
|
30
38
|
console.log(keys);
|
|
31
39
|
};
|
|
32
40
|
|
|
33
|
-
//
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
// 渲染菜单
|
|
42
|
+
const renderMenu = (menu) => {
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
<a-menu-item key={menu.url}>
|
|
46
|
+
{{
|
|
47
|
+
icon: () => renderIcon(menu),
|
|
48
|
+
default: () => menu.title
|
|
49
|
+
}}
|
|
50
|
+
</a-menu-item>
|
|
51
|
+
</>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const iconClass = ["anticon", "anticon-menu", "ant-menu-item-icon"];
|
|
56
|
+
// 渲染图标
|
|
57
|
+
const renderIcon = (menu) => {
|
|
58
|
+
return (
|
|
59
|
+
<>
|
|
60
|
+
{!menu.icon ? (
|
|
61
|
+
<div v-show={getCollapsed.value} className={iconClass}>
|
|
62
|
+
{menu.title.substring(0, 1)}
|
|
63
|
+
</div>
|
|
64
|
+
) : (
|
|
65
|
+
renderIconSwitch(menu.icon)
|
|
66
|
+
)}
|
|
67
|
+
</>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const renderIconSwitch = (icon) => {
|
|
72
|
+
if (componentName === "nativeHtml") {
|
|
73
|
+
return <span v-html={icon}></span>;
|
|
74
|
+
} else {
|
|
75
|
+
return h(resolveComponent(componentName), {
|
|
76
|
+
prop: icon
|
|
77
|
+
});
|
|
37
78
|
}
|
|
79
|
+
};
|
|
38
80
|
|
|
81
|
+
// 递归渲染子菜单
|
|
82
|
+
const renderSub = (menu) => {
|
|
39
83
|
return (
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
84
|
+
<>
|
|
85
|
+
<a-sub-menu key={menu.url}>
|
|
86
|
+
{{
|
|
87
|
+
title: () => menu.title,
|
|
88
|
+
icon: () => renderIcon(menu),
|
|
89
|
+
default: () => {
|
|
90
|
+
return menu.children.map(
|
|
91
|
+
(item) =>
|
|
92
|
+
!item.children || item.children.length === 0
|
|
93
|
+
? renderSubMenu(item)
|
|
94
|
+
: renderSub(item) // 递归调用
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}}
|
|
98
|
+
</a-sub-menu>
|
|
99
|
+
</>
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// 递归下的子菜单
|
|
104
|
+
const renderSubMenu = (menu) => {
|
|
105
|
+
return (
|
|
106
|
+
<>
|
|
107
|
+
<a-menu-item key={menu.url}>
|
|
108
|
+
{{
|
|
109
|
+
default: () => menu.title
|
|
110
|
+
}}
|
|
111
|
+
</a-menu-item>
|
|
112
|
+
</>
|
|
50
113
|
);
|
|
51
114
|
};
|
|
52
115
|
|
|
53
116
|
return () => (
|
|
54
117
|
<a-menu
|
|
55
118
|
mode="inline"
|
|
119
|
+
theme="dark"
|
|
56
120
|
v-model:openKeys={openKeys.value}
|
|
57
121
|
v-model:selectedKeys={selectedKeys.value}
|
|
58
122
|
onClick={onClick}
|
|
59
123
|
>
|
|
60
|
-
{list.map((menu) =>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
),
|
|
69
|
-
default: () => {
|
|
70
|
-
if (menu.children && menu.children.length) {
|
|
71
|
-
return menu.children.map((child) => {
|
|
72
|
-
return (
|
|
73
|
-
<>
|
|
74
|
-
{child.children ? (
|
|
75
|
-
renderSubMenu(child.children, menu)
|
|
76
|
-
) : (
|
|
77
|
-
<a-menu-item key={child.url}>
|
|
78
|
-
{child.title}
|
|
79
|
-
</a-menu-item>
|
|
80
|
-
)}
|
|
81
|
-
</>
|
|
82
|
-
);
|
|
83
|
-
});
|
|
84
|
-
} else {
|
|
85
|
-
return <>无子标签</>;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}}
|
|
89
|
-
</a-sub-menu>
|
|
90
|
-
))}
|
|
124
|
+
{list.map((menu) => {
|
|
125
|
+
if (!menu.children || menu.children?.length === 0) {
|
|
126
|
+
// 没有children属性或者children的长度等于0
|
|
127
|
+
return renderMenu(menu);
|
|
128
|
+
} else {
|
|
129
|
+
return renderSub(menu);
|
|
130
|
+
}
|
|
131
|
+
})}
|
|
91
132
|
</a-menu>
|
|
92
133
|
);
|
|
93
134
|
}
|
|
@@ -10,9 +10,17 @@
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.ditari-layout {
|
|
14
|
-
background-color:
|
|
15
|
-
.
|
|
16
|
-
background-color:
|
|
13
|
+
.ditari-layout-sider {
|
|
14
|
+
background-color: $side-bg-color;
|
|
15
|
+
.ant-menu-dark {
|
|
16
|
+
background-color: $side-bg-color;
|
|
17
|
+
.ant-menu-inline.ant-menu-sub {
|
|
18
|
+
background-color: $side-menu-sub-bg-color;
|
|
19
|
+
}
|
|
20
|
+
.ant-menu{
|
|
21
|
+
&:before,&:after{
|
|
22
|
+
//display: none;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
26
|
}
|
|
@@ -6,16 +6,33 @@ $bg-color: #f0f2f5;
|
|
|
6
6
|
$logo-height: 240px !default;
|
|
7
7
|
/******======网格变量======******/
|
|
8
8
|
//网格边框颜色
|
|
9
|
-
$grid-border-color: #4e4e4e;
|
|
9
|
+
$grid-border-color: #4e4e4e !default;
|
|
10
10
|
// 网格里面输入框获取焦点时的边框颜色
|
|
11
|
-
$grid-input-focus-border-color: #1890ff;
|
|
11
|
+
$grid-input-focus-border-color: #1890ff !default;
|
|
12
12
|
//输入框校验不通过时候的颜色
|
|
13
|
-
$grid-input-error-border-color: #ff4d4f;
|
|
13
|
+
$grid-input-error-border-color: #ff4d4f !default;
|
|
14
14
|
// 网格输入框边框宽度
|
|
15
|
-
$grid-input-border-width: 2px;
|
|
15
|
+
$grid-input-border-width: 2px !default;
|
|
16
16
|
// 网格边框宽度
|
|
17
|
-
$gird-border-width: 1px;
|
|
17
|
+
$gird-border-width: 1px !default;
|
|
18
18
|
|
|
19
|
+
// show头部阴影
|
|
20
|
+
$box-shadow-color: #e0e0e0 !default;
|
|
21
|
+
|
|
22
|
+
/******======左侧菜单======******/
|
|
19
23
|
// 左侧菜单
|
|
20
|
-
|
|
24
|
+
|
|
21
25
|
$logo-height: 40px !default;
|
|
26
|
+
//左侧菜单北京颜色
|
|
27
|
+
$side-bg-color: #162157 !default;
|
|
28
|
+
//子菜单展开后的背景颜色
|
|
29
|
+
$side-menu-sub-bg-color: #101847 !default;
|
|
30
|
+
|
|
31
|
+
/******======多标签======******/
|
|
32
|
+
$nav-tab-bg-color: linear-gradient(270deg, #019cfe 0%, #0165fe 100%) !default;
|
|
33
|
+
//分割符颜色
|
|
34
|
+
$nav-tab-dividers-color: #fff !default;
|
|
35
|
+
// 字体颜色
|
|
36
|
+
$nav-tab-text-color: #fff !default;
|
|
37
|
+
// 悬浮的背景色
|
|
38
|
+
$nav-tab-hover-bg-color: #065de1 !default;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import { defineStore } from "pinia";
|
|
2
2
|
import { USER_ID } from "../types";
|
|
3
3
|
|
|
4
|
+
export interface State {
|
|
5
|
+
token: string | undefined;
|
|
6
|
+
userInfo: any;
|
|
7
|
+
}
|
|
4
8
|
export const useUserStore = defineStore(USER_ID, {
|
|
5
|
-
state: () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
},
|
|
9
|
+
state: (): State => ({
|
|
10
|
+
token: undefined,
|
|
11
|
+
userInfo: undefined
|
|
12
|
+
}),
|
|
11
13
|
getters: {
|
|
12
|
-
getToken: (state) => state.token
|
|
14
|
+
getToken: (state) => state.token,
|
|
15
|
+
getUserInfo: (state) => state.userInfo
|
|
13
16
|
},
|
|
14
17
|
actions: {
|
|
15
18
|
/**
|
|
16
19
|
* 保存token
|
|
17
20
|
* @param token
|
|
18
21
|
*/
|
|
19
|
-
saveToken(token:
|
|
22
|
+
saveToken(token: string) {
|
|
20
23
|
this.token = token;
|
|
24
|
+
},
|
|
25
|
+
saveUserInfo(data: any) {
|
|
26
|
+
this.userInfo = data;
|
|
21
27
|
}
|
|
22
|
-
}
|
|
28
|
+
},
|
|
29
|
+
persist: true
|
|
23
30
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Breadcrumb.vue.cjs.js");require("./Breadcrumb.vue.cjs2.js");exports.default=e.default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./List.vue.cjs.js");require("./List.vue.cjs2.js");exports.default=e.default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Main.vue.cjs.js");require("./Main.vue.cjs2.js");exports.default=e.default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../../store/modules/Menu.cjs.js");function d(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!e.isVNode(o)}const i=e.defineComponent({name:"DMenu",setup(){const{list:o}=s.useMenuStore(),r=e.ref(["/labelList","/label"]),u=e.ref(["/label"]),a=({item:l,key:t,keyPath:n})=>{console.log(l,t,n),r.value=n,u.value=[t]},c=(l,t)=>!l||!l.length?null:e.createVNode(e.resolveComponent("a-sub-menu"),null,{title:()=>t.title,default:()=>l.map(n=>e.createVNode(e.resolveComponent("a-menu-item"),{key:n.url},{default:()=>[n.title]}))});return()=>{let l;return e.createVNode(e.resolveComponent("a-menu"),{mode:"inline",openKeys:r.value,"onUpdate:openKeys":t=>r.value=t,selectedKeys:u.value,"onUpdate:selectedKeys":t=>u.value=t,onClick:a},d(l=o.map(t=>e.createVNode(e.resolveComponent("a-sub-menu"),{key:t.url},{title:()=>e.createVNode(e.Fragment,null,[t.title]),icon:()=>e.createVNode(e.Fragment,null,[e.createVNode("span",null,[t.icon?e.h(e.resolveComponent(t.icon)):void 0])]),default:()=>t.children&&t.children.length?t.children.map(n=>e.createVNode(e.Fragment,null,[n.children?c(n.children,t):e.createVNode(e.resolveComponent("a-menu-item"),{key:n.url},{default:()=>[n.title]})])):e.createVNode(e.Fragment,null,[e.createTextVNode("无子标签")])})))?l:{default:()=>[l]})}}});exports.default=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./NavTabs.vue.cjs.js");require("./NavTabs.vue.cjs2.js");exports.default=e.default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Show.vue.cjs.js");require("./Show.vue.cjs2.js");exports.default=e.default;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, ref as c, createVNode as l, resolveComponent as o, Fragment as r, h as f, createTextVNode as b, isVNode as m } from "vue";
|
|
2
|
-
import { useMenuStore as y } from "../../store/modules/Menu.esm.js";
|
|
3
|
-
function v(u) {
|
|
4
|
-
return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !m(u);
|
|
5
|
-
}
|
|
6
|
-
const h = /* @__PURE__ */ p({
|
|
7
|
-
name: "DMenu",
|
|
8
|
-
setup() {
|
|
9
|
-
const {
|
|
10
|
-
list: u
|
|
11
|
-
} = y(), a = c(["/labelList", "/label"]), i = c(["/label"]), s = ({
|
|
12
|
-
item: n,
|
|
13
|
-
key: e,
|
|
14
|
-
keyPath: t
|
|
15
|
-
}) => {
|
|
16
|
-
console.log(n, e, t), a.value = t, i.value = [e];
|
|
17
|
-
}, d = (n, e) => !n || !n.length ? null : l(o("a-sub-menu"), null, {
|
|
18
|
-
title: () => e.title,
|
|
19
|
-
default: () => n.map((t) => l(o("a-menu-item"), {
|
|
20
|
-
key: t.url
|
|
21
|
-
}, {
|
|
22
|
-
default: () => [t.title]
|
|
23
|
-
}))
|
|
24
|
-
});
|
|
25
|
-
return () => {
|
|
26
|
-
let n;
|
|
27
|
-
return l(o("a-menu"), {
|
|
28
|
-
mode: "inline",
|
|
29
|
-
openKeys: a.value,
|
|
30
|
-
"onUpdate:openKeys": (e) => a.value = e,
|
|
31
|
-
selectedKeys: i.value,
|
|
32
|
-
"onUpdate:selectedKeys": (e) => i.value = e,
|
|
33
|
-
onClick: s
|
|
34
|
-
}, v(n = u.map((e) => l(o("a-sub-menu"), {
|
|
35
|
-
key: e.url
|
|
36
|
-
}, {
|
|
37
|
-
title: () => l(r, null, [e.title]),
|
|
38
|
-
icon: () => l(r, null, [l("span", null, [e.icon ? f(o(e.icon)) : void 0])]),
|
|
39
|
-
default: () => e.children && e.children.length ? e.children.map((t) => l(r, null, [t.children ? d(t.children, e) : l(o("a-menu-item"), {
|
|
40
|
-
key: t.url
|
|
41
|
-
}, {
|
|
42
|
-
default: () => [t.title]
|
|
43
|
-
})])) : l(r, null, [b("无子标签")])
|
|
44
|
-
}))) ? n : {
|
|
45
|
-
default: () => [n]
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
export {
|
|
51
|
-
h as default
|
|
52
|
-
};
|
|
File without changes
|
|
File without changes
|