[Doc] NoticeBar: update demo

This commit is contained in:
陈嘉涵
2019-05-11 10:19:54 +08:00
parent fad00eeeab
commit 0c5d904fb3
5 changed files with 114 additions and 67 deletions
+31 -16
View File
@@ -7,17 +7,6 @@
/>
</demo-block>
<demo-block :title="$t('mode')">
<van-notice-bar
mode="closeable"
:text="$t('text')"
/>
<van-notice-bar
mode="link"
:text="$t('text')"
/>
</demo-block>
<demo-block :title="$t('unscrollable')">
<van-notice-bar
:scrollable="false"
@@ -32,6 +21,26 @@
:text="$t('text')"
/>
</demo-block>
<demo-block :title="$t('mode')">
<van-notice-bar
mode="closeable"
:text="$t('text')"
/>
<van-notice-bar
mode="link"
:text="$t('text')"
/>
</demo-block>
<demo-block :title="$t('customStyle')">
<van-notice-bar
:text="$t('text')"
color="#1989fa"
background="#ecf9ff"
left-icon="info-o"
/>
</demo-block>
</demo-section>
</template>
@@ -40,15 +49,17 @@ export default {
i18n: {
'zh-CN': {
unscrollable: '禁用滚动',
mode: '通栏模式',
wrapable: '文本换行',
text: '足协杯战线连续第2年上演广州德比战,上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。'
mode: '通栏模式',
wrapable: '多行展示',
text: '足协杯战线连续第2年上演广州德比战,上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。',
customStyle: '自定义样式'
},
'en-US': {
mode: 'Mode',
wrapable: 'Wrapable',
unscrollable: 'Disable scroll',
text: 'Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily.'
text: 'Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily.',
customStyle: 'Custom Style'
}
}
};
@@ -57,7 +68,11 @@ export default {
<style lang="less">
.demo-notice-bar {
.van-notice-bar:not(:first-of-type) {
margin-top: 15px;
margin-top: 5px;
}
.van-doc-demo-block__title {
padding-top: 25px;
}
}
</style>