[improvement] Tag: add color prop (#1946)
This commit is contained in:
@@ -7,19 +7,26 @@
|
||||
<van-tag type="primary">{{ $t('tag') }}</van-tag>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('title2')">
|
||||
<demo-block :title="$t('plain')">
|
||||
<van-tag plain>{{ $t('tag') }}</van-tag>
|
||||
<van-tag plain type="danger">{{ $t('tag') }}</van-tag>
|
||||
<van-tag plain type="primary">{{ $t('tag') }}</van-tag>
|
||||
<van-tag plain type="success">{{ $t('tag') }}</van-tag>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('title3')">
|
||||
<demo-block :title="$t('round')">
|
||||
<van-tag mark>{{ $t('tag') }}</van-tag>
|
||||
<van-tag mark type="danger">{{ $t('tag') }}</van-tag>
|
||||
<van-tag mark type="primary">{{ $t('tag') }}</van-tag>
|
||||
<van-tag mark type="success">{{ $t('tag') }}</van-tag>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('customColor')">
|
||||
<van-tag color="#f2826a">{{ $t('tag') }}</van-tag>
|
||||
<van-tag color="#f2826a" plain>{{ $t('tag') }}</van-tag>
|
||||
<van-tag color="#7232dd">{{ $t('tag') }}</van-tag>
|
||||
<van-tag color="#7232dd" plain>{{ $t('tag') }}</van-tag>
|
||||
</demo-block>
|
||||
</demo-section>
|
||||
</template>
|
||||
|
||||
@@ -27,12 +34,14 @@
|
||||
export default {
|
||||
i18n: {
|
||||
'zh-CN': {
|
||||
title2: '空心样式',
|
||||
title3: '圆角样式'
|
||||
plain: '空心样式',
|
||||
round: '圆角样式',
|
||||
customColor: '自定义颜色'
|
||||
},
|
||||
'en-US': {
|
||||
title2: 'Plain style',
|
||||
title3: 'Mark style'
|
||||
plain: 'Plain style',
|
||||
round: 'Mark style',
|
||||
customColor: 'Custom Color'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user