diff --git a/src/components/card/card.vue b/src/components/card/card.vue index bfb973a1..f5714acd 100644 --- a/src/components/card/card.vue +++ b/src/components/card/card.vue @@ -1,7 +1,7 @@ @@ -51,12 +51,8 @@ } }, mounted () { - if (this.$refs.head) { - this.showHead = this.$refs.head.innerHTML != ''; - } - if (this.$refs.extra) { - this.showExtra = this.$refs.extra.innerHTML != ''; - } + this.showHead = this.$slots.title !== undefined; + this.showExtra = this.$slots.extra !== undefined; } }; diff --git a/test/routers/card.vue b/test/routers/card.vue index 06f94d6c..c3edcbde 100644 --- a/test/routers/card.vue +++ b/test/routers/card.vue @@ -1,42 +1,88 @@ \ No newline at end of file +