Skip to content

Commit bd9f2aa

Browse files
author
wangbing11
committed
update for Breadcrumb; update home;
1 parent 0c8c73d commit bd9f2aa

File tree

22 files changed

+458
-243
lines changed

22 files changed

+458
-243
lines changed

src/components/layout/default/Layout.vue

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<template>
2-
<div class="layout-container">
2+
<div class="layout-default-container">
33
<Layout>
44
<appHeader />
5-
<Layout class="layout-body ivu-layout-has-sider">
5+
<Layout class="layout-default-body ivu-layout-default-has-sider">
66
<appSlider
77
:menu-list="menuList"
88
:active-name="pagePath"
99
:open-names="openNames"
1010
@on-select="turnToPage"
1111
/>
12-
<Layout class="layout-body-right">
12+
<Layout class="layout-default-body-right">
1313
<Breadcrumb v-if="breadcrumb.length > 1" :data="breadcrumb" />
14-
<Content class="layout-body-right-content">
14+
<Content class="layout-default-body-right-content">
1515
<router-view />
1616
</Content>
1717
</Layout>
@@ -64,14 +64,9 @@ export default {
6464
};
6565
</script>
6666
<style lang="less" scoped>
67-
.ivu-layout-header {
68-
padding: 0 30px;
69-
}
70-
</style>
71-
<style lang="less" scoped>
72-
.layout {
67+
68+
.layout-default {
7369
border: 1px solid #d7dde4;
74-
background: #f5f7f9;
7570
position: relative;
7671
border-radius: 4px;
7772
overflow: hidden;
@@ -80,11 +75,10 @@ export default {
8075
display: flex;
8176
flex-direction: row;
8277
&-right {
83-
padding: 10px;
78+
background: #fff;
8479
&-content {
85-
padding: 10px;
80+
margin: 0 32px;
8681
min-height: 700px;
87-
background: #fff;
8882
}
8983
}
9084
}

src/components/layout/default/components/breadcrumb/Breadcrumb.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<template>
2-
<Breadcrumb :style="{ margin: '24px 0' }">
3-
<BreadcrumbItem v-for="(item, index) in data" :key="index">
4-
{{ item.label }}
2+
<Breadcrumb class="layout-default-breadcrumb">
3+
<BreadcrumbItem
4+
v-for="(item, index) in data"
5+
:key="index">
6+
{{ item }}
57
</BreadcrumbItem>
68
</Breadcrumb>
79
</template>
@@ -22,4 +24,8 @@ export default {
2224
computed: {}
2325
};
2426
</script>
25-
<style lang="less" scoped></style>
27+
<style lang="less">
28+
.layout-default-breadcrumb {
29+
margin: 24px 32px
30+
}
31+
</style>
Lines changed: 62 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
<template>
2-
<Header>
3-
<Menu mode="horizontal" theme="dark" active-name="1">
4-
<div class="layout-logo"></div>
5-
<div class="layout-nav">
6-
<Submenu name="3">
7-
<template slot="title">
8-
生态
9-
</template>
10-
<MenuItem name="3-1">
11-
Configurable Plaform
2+
<div class="layout-default-header">
3+
<Header>
4+
<Menu mode="horizontal" theme="dark" active-name="1">
5+
<div class="layout-default-header-logo"></div>
6+
<div class="layout-default-header-nav">
7+
<Submenu name="3">
8+
<template slot="title">
9+
生态
10+
</template>
11+
<MenuItem name="3-1">
12+
Configurable Plaform
13+
</MenuItem>
14+
<MenuItem name="3-2">
15+
form-generator-iview
16+
</MenuItem>
17+
<MenuItem name="3-2">
18+
data-vis-iview
19+
</MenuItem>
20+
</Submenu>
21+
<MenuItem name="2">
22+
<user />
1223
</MenuItem>
13-
<MenuItem name="3-2">
14-
form-generator-iview
15-
</MenuItem>
16-
<MenuItem name="3-2">
17-
data-vis-iview
18-
</MenuItem>
19-
</Submenu>
20-
<MenuItem name="2">
21-
<user />
22-
</MenuItem>
23-
</div>
24-
</Menu>
25-
</Header>
24+
</div>
25+
</Menu>
26+
</Header>
27+
</div>
2628
</template>
2729

2830
<script>
@@ -36,39 +38,44 @@ export default {
3638
}
3739
};
3840
</script>
39-
<style lang="less" scoped>
40-
.layout-logo {
41-
width: 70px;
42-
height: 30px;
43-
border-radius: 3px;
44-
float: left;
45-
position: relative;
46-
top: 6px;
47-
left: 20px;
48-
line-height: 40px;
49-
text-align: center;
50-
color: #fff;
51-
background-repeat: no-repeat;
52-
background-size: contain;
53-
background-image: url("./images/logo.png");
54-
}
41+
<style lang="less">
42+
.layout-default-header {
43+
&-logo {
44+
width: 70px;
45+
height: 30px;
46+
border-radius: 3px;
47+
float: left;
48+
position: relative;
49+
top: 6px;
50+
left: 20px;
51+
line-height: 40px;
52+
text-align: center;
53+
color: #fff;
54+
background-repeat: no-repeat;
55+
background-size: contain;
56+
background-image: url("./images/logo.png");
57+
}
5558
56-
.layout-nav {
57-
float: right;
58-
margin: 0 40px;
59-
}
59+
&-nav {
60+
float: right;
61+
margin: 0 40px;
62+
}
6063
61-
.ivu-layout-header {
62-
background: #000;
63-
padding: 0 !important;
64-
height: 41px;
65-
line-height: 41px;
66-
}
67-
.ivu-menu-dark {
68-
background: #000;
69-
}
70-
.ivu-menu-horizontal {
71-
height: 41px;
72-
line-height: 41px;
64+
.ivu-layout-header {
65+
background: #000;
66+
padding: 0 !important;
67+
height: 41px;
68+
line-height: 41px;
69+
}
70+
.ivu-menu-dark {
71+
background: #000;
72+
}
73+
.ivu-menu-horizontal {
74+
height: 41px;
75+
line-height: 41px;
76+
}
7377
}
78+
79+
80+
7481
</style>

src/components/layout/default/components/slider/appSlider.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<template>
2-
<Sider hide-trigger :style="{ background: '#fff', width: '240px' }">
2+
<Sider
3+
class="layout-default-slider"
4+
hide-trigger
5+
>
36
<Menu
7+
class="layout-default-slider-menu"
48
:active-name="activeName"
59
:open-names="openNames"
610
theme="light"
@@ -58,4 +62,13 @@ export default {
5862
}
5963
};
6064
</script>
61-
<style lang="less" scoped></style>
65+
<style lang="less">
66+
.layout-default-slider {
67+
background: #fff;
68+
width: 240px;
69+
70+
&-menu {
71+
height: 100%;
72+
}
73+
}
74+
</style>

src/libs/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ export function computeBreadCrumbList(currentPath = "", menuList = []) {
44
if (item.submenu) {
55
item.submenu.forEach(subItem => {
66
if (currentPath === subItem.path) {
7-
breadCrumbList.push(subItem);
7+
breadCrumbList.push(item.label, subItem.label);
88
}
99
});
1010
} else {
1111
if (currentPath === item.path) {
12-
breadCrumbList.push(item);
12+
breadCrumbList.push(item.label);
1313
}
1414
}
1515
});

src/page/form-popover/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default [
22
{
3-
path: "/form-slideout",
3+
path: "/form-popover",
44
component: () =>
55
import(/* webpackChunkName: "form-simple" */ "./index.vue")
66
}

src/page/form/index.vue

Lines changed: 0 additions & 96 deletions
This file was deleted.

src/page/form/router.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
export default [
22
{
33
path: "/form",
4-
redirect: "/form/index"
5-
},
6-
{
7-
path: "/form/index",
8-
component: () => import(/* webpackChunkName: "form-index" */ "./index")
4+
redirect: "/form-simple"
95
}
10-
// {
11-
// path: "/form/conversational",
12-
// component: () =>
13-
// import(
14-
// /* webpackChunkName: "form-conversational" */ "./views/conversational"
15-
// )
16-
// }
176
];

0 commit comments

Comments
 (0)