no message

Former-commit-id: 24eeb4f81eeb7369d02c362ded62b0f488aa5361
Former-commit-id: 90c0466974ab6e241d51894c87c7c5d9951d9866
Former-commit-id: e79975605ba0428165250197e3178bde4cff9b78
This commit is contained in:
李杨
2018-03-22 23:07:57 +08:00
parent 8a824c489e
commit 00e888efb0
8 changed files with 48 additions and 7 deletions

View File

@@ -4,4 +4,7 @@
ul {
list-style: disc;
}
h1, h2 {
border-bottom: none;
}
}

View File

@@ -6,6 +6,9 @@
<div class="dd-card-full__body" :style="bodyStyle">
<slot></slot>
</div>
<div v-if="$slots.footer" class="dd-card-full__footer" ref="footer">
<slot name="footer"></slot>
</div>
</div>
</template>
@@ -36,11 +39,13 @@ export default {
},
data () {
return {
headerHeight: 0
headerHeight: 0,
footerHeight: 0
}
},
mounted () {
this.headerHeight = this.$slots.header ? this.$refs.header.offsetHeight : 0
this.footerHeight = this.$slots.footer ? this.$refs.footer.offsetHeight : 0
},
computed: {
cardStyle () {
@@ -53,7 +58,8 @@ export default {
},
bodyStyle () {
return {
top: `${this.headerHeight}px`
top: `${this.headerHeight}px`,
bottom: `${this.footerHeight}px`
}
}
}
@@ -74,6 +80,8 @@ export default {
}
.dd-card-full__header {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
padding: 18px 20px;
border-bottom: 1px solid #ebeef5;
@@ -87,5 +95,14 @@ export default {
bottom: 0px;
overflow: auto;
}
.dd-card-full__footer {
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
padding: 18px 20px;
border-top: 1px solid #ebeef5;
box-sizing: border-box;
}
}
</style>

View File

@@ -14,6 +14,7 @@
<card-full v-if="type === 'card-full'" :right="20" :bottom="20">
<slot v-if="$slots.header" name="header" slot="header"></slot>
<slot></slot>
<slot v-if="$slots.footer" name="footer" slot="footer"></slot>
</card-full>
</div>
</template>

View File

@@ -3,7 +3,7 @@
<template slot="header">
我是插入到 header 中的内容
</template>
<Markdown url="/static/md/演示文章 - 页面.md"></Markdown>
<Markdown url="/static/md/组件 - 页面容器 - 撑满.md"></Markdown>
<template slot="footer">
我是插入到 footer 中的内容
</template>