layout-content.vue
1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<template>
<div class="layout-content">
<div class="layout-header">
<i-breadcrumb>
<i-breadcrumb-item >Home首页</i-breadcrumb-item>
<i-breadcrumb-item :to="bread.url" v-for="(bread, inx) in breads" :key="inx">{{bread.title}}</i-breadcrumb-item>
</i-breadcrumb>
</div>
<div class="layout-box">
<i-card class="layout-card">
<div class="layout-card-content">
<slot></slot>
</div>
</i-card>
</div>
</div>
</template>
<script>
export default {
name: 'LayoutContent',
props: {
breads: {
type: Array,
default() {
return [];
}
}
}
};
</script>
<style lang="scss" scoped>
.layout-content {
width: 100%;
height: 100%;
background: #f5f7f9;
display: flex;
flex-direction: column;
.layout-header {
height: 64px;
line-height: 64px;
background: #fff;
padding: 0 20px;
}
.layout-box {
width: 100%;
height: 100%;
padding: 18px;
flex: 1;
overflow: hidden;
}
.layout-card {
height: inherit;
& > /deep/.ivu-card-body {
height: inherit;
}
.layout-card-content {
height: inherit;
display: flex;
flex-direction: column;
}
}
}
</style>