fix(skeleton): fix title always displayed (#612)

This commit is contained in:
V 2019-11-08 17:26:08 +08:00 committed by Shawn Xu
parent c1062687c6
commit 202f2c93c1
1 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,7 @@
}"
></div>
<div class="md-skeleton-content">
<h4 class="md-skeleton-title" :style="{ width: getTitleWidth() }" />
<h4 v-if="title" class="md-skeleton-title" :style="{ width: getTitleWidth() }" />
<div
v-for="index in row"
class="md-skeleton-row"
@ -23,7 +23,8 @@
<slot></slot>
</div>
</template>
<script> const DEFUALT_TITLE_WIDTH = '40%'
<script>
const DEFUALT_TITLE_WIDTH = '40%'
const DEFUALT_WIDTH = '100%'
export default {
@ -82,7 +83,8 @@ export default {
},
},
}
</script>
</script>
<style lang="stylus">
placeHolder()