From 584797f71450a345509f7ff642ecf43c36aebb00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Sat, 10 Mar 2018 21:13:19 +0800 Subject: [PATCH] no message Former-commit-id: 15df450e76e11e0692296a378d1465bf73aedeaf Former-commit-id: c1aeda2883a70d55bf8ec36696b1777d1e2f420e Former-commit-id: 2544085126872b1c5b0fd758258195ec68ca6dc2 --- src/components/core/CardFull/index.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/core/CardFull/index.vue b/src/components/core/CardFull/index.vue index 7516cf78..9df1b56f 100644 --- a/src/components/core/CardFull/index.vue +++ b/src/components/core/CardFull/index.vue @@ -3,7 +3,7 @@
-
+
@@ -34,8 +34,13 @@ export default { default: 0 } }, + data () { + return { + headerHeight: 0 + } + }, mounted () { - console.log(this.$refs.header.offsetHeight) + this.headerHeight = this.$refs.header.offsetHeight }, computed: { cardStyle () { @@ -45,6 +50,11 @@ export default { bottom: `${this.bottom}px`, left: `${this.left}px` } + }, + bodyStyle () { + return { + top: `${this.headerHeight}px` + } } } } @@ -63,12 +73,19 @@ export default { box-shadow: 0 0 8px 0 rgba(232,237,250,.6), 0 2px 4px 0 rgba(232,237,250,.5); } .dd-card-full__header { + position: absolute; + width: 100%; padding: 18px 20px; border-bottom: 1px solid #ebeef5; box-sizing: border-box; } .dd-card-full__body { + position: absolute; padding: 20px; + left: 0px; + right: 0px; + bottom: 0px; + overflow: auto; } }