mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
* 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
92 lines
2.1 KiB
Vue
92 lines
2.1 KiB
Vue
<template>
|
|
<demo-section>
|
|
<demo-block :title="$t('title1')">
|
|
<van-button type="default">Default</van-button>
|
|
<van-button type="primary">Primary</van-button>
|
|
<van-button type="danger">Danger</van-button>
|
|
</demo-block>
|
|
|
|
<demo-block :title="$t('title2')">
|
|
<van-button size="large">Large</van-button>
|
|
<van-button size="normal">Normal</van-button>
|
|
<van-button size="small">Small</van-button>
|
|
<van-button size="mini">Mini</van-button>
|
|
</demo-block>
|
|
|
|
<demo-block :title="$t('disabled')">
|
|
<van-button disabled>Diabled</van-button>
|
|
</demo-block>
|
|
|
|
<demo-block :title="$t('title3')">
|
|
<van-button loading></van-button>
|
|
<van-button loading type="primary"></van-button>
|
|
</demo-block>
|
|
|
|
<demo-block :title="$t('title4')">
|
|
<van-button tag="a" href="https://www.youzan.com" target="_blank">
|
|
{{ $t('button') }}
|
|
</van-button>
|
|
</demo-block>
|
|
|
|
<demo-block :title="$t('title5')">
|
|
<van-button type="primary" bottomAction>{{ $t('button') }}</van-button>
|
|
|
|
<van-row>
|
|
<van-col span="12">
|
|
<van-button bottomAction>{{ $t('button') }}</van-button>
|
|
</van-col>
|
|
<van-col span="12">
|
|
<van-button type="primary" bottomAction>{{ $t('button') }}</van-button>
|
|
</van-col>
|
|
</van-row>
|
|
</demo-block>
|
|
</demo-section>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
i18n: {
|
|
'zh-CN': {
|
|
title1: '按钮类型',
|
|
title2: '按钮尺寸',
|
|
title3: '加载状态',
|
|
title4: '自定义按钮标签',
|
|
title5: '页面底部操作按钮'
|
|
},
|
|
'en-US': {
|
|
title1: 'Type',
|
|
title2: 'Size',
|
|
title3: 'Loading',
|
|
title4: 'Custom Tag',
|
|
title5: 'Action Button'
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|
|
<style lang="postcss">
|
|
.demo-button {
|
|
.van-button {
|
|
user-select: none;
|
|
|
|
&--large,
|
|
&--bottom-action {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
&--small,
|
|
&--normal {
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
|
|
.van-doc-demo-block {
|
|
padding: 0 15px;
|
|
}
|
|
|
|
.van-doc-demo-block__title {
|
|
padding-left: 0;
|
|
}
|
|
}
|
|
</style> |