no message
Former-commit-id: 24eeb4f81eeb7369d02c362ded62b0f488aa5361 Former-commit-id: 90c0466974ab6e241d51894c87c7c5d9951d9866 Former-commit-id: e79975605ba0428165250197e3178bde4cff9b78
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user