vant/docs/demos/views/notice-bar.vue
neverland d8b6ad7d54
[new feature] add i18n support (#310)
* fix: Tabbar icon line-height

* [new feature] progress add showPivot prop

* [new feature] TabItem support vue-router

* [new feature] update document header style

* [Doc] add toast english ducoment

* [new feature] add i18n support

* feat: Extract demos from markdown

* feat: Base components demos

* [new feature] complete demo extract & translate

* [fix] text cases

* fix: add deepAssign test cases

* fix: changelog detail

* [new feature] AddressEdit support i18n
2017-11-15 20:08:51 -06:00

44 lines
1.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<demo-section>
<demo-block :title="$t('basicUsage')">
<van-notice-bar
:text="$t('text')"
leftIcon="//img.yzcdn.cn/public_files/2017/8/10/6af5b7168eed548100d9041f07b7c616.png"
/>
</demo-block>
<demo-block :title="$t('title2')">
<van-notice-bar :scrollable="false" :text="$t('text')" />
</demo-block>
<demo-block :title="$t('title3')">
<van-notice-bar mode="closeable" :text="$t('text')" />
<van-notice-bar mode="link" :text="$t('text')" />
</demo-block>
</demo-section>
</template>
<script>
export default {
i18n: {
'zh-CN': {
title2: '禁用滚动',
title3: '通告栏模式',
text: '足协杯战线连续第2年上演广州德比战上赛季半决赛上恒大以两回合5-3的总比分淘汰富力。'
},
'en-US': {
title2: 'Disable scroll',
title3: 'Mode',
text: 'Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily.'
}
}
}
</script>
<style lang="postcss">
.demo-notice-bar {
.van-notice-bar:not(:first-of-type) {
margin-top: 15px;
}
}
</style>