feat(NoticeBar): allow to force scrolling
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<demo-section>
|
||||
<demo-block :title="t('basicUsage')">
|
||||
<van-notice-bar :text="t('text')" left-icon="volume-o" />
|
||||
<van-notice-bar :text="t('text')" scrollable left-icon="volume-o" />
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('unscrollable')">
|
||||
<demo-block :title="t('scrollable')">
|
||||
<van-notice-bar scrollable :text="t('shortText')" />
|
||||
<van-notice-bar :scrollable="false" :text="t('text')" />
|
||||
</demo-block>
|
||||
|
||||
@@ -13,13 +14,13 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('mode')">
|
||||
<van-notice-bar mode="closeable" :text="t('text')" />
|
||||
<van-notice-bar mode="link" :text="t('text')" />
|
||||
<van-notice-bar mode="closeable" :text="t('shortText')" />
|
||||
<van-notice-bar mode="link" :text="t('shortText')" />
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('customStyle')">
|
||||
<van-notice-bar
|
||||
:text="t('text')"
|
||||
:text="t('shortText')"
|
||||
color="#1989fa"
|
||||
background="#ecf9ff"
|
||||
left-icon="info-o"
|
||||
@@ -47,23 +48,23 @@
|
||||
export default {
|
||||
i18n: {
|
||||
'zh-CN': {
|
||||
text:
|
||||
'足协杯战线连续第2年上演广州德比战,上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。',
|
||||
text: '在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。',
|
||||
mode: '通知栏模式',
|
||||
content: '内容',
|
||||
wrapable: '多行展示',
|
||||
unscrollable: '禁用滚动',
|
||||
shortText: '技术是开发它的人的共同灵魂。',
|
||||
scrollable: '滚动播放',
|
||||
customStyle: '自定义样式',
|
||||
verticalScroll: '垂直滚动',
|
||||
},
|
||||
'en-US': {
|
||||
text:
|
||||
'Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily.',
|
||||
text: 'Technology is the common soul of the people who developed it.',
|
||||
mode: 'Mode',
|
||||
content: 'Content',
|
||||
wrapable: 'Wrapable',
|
||||
shortText: 'Some short text.',
|
||||
customStyle: 'Custom Style',
|
||||
unscrollable: 'Disable scroll',
|
||||
scrollable: 'Scrollable',
|
||||
verticalScroll: 'Vertical Scroll',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user