[new feature] Loading: add default slot

This commit is contained in:
陈嘉涵
2019-04-30 17:18:25 +08:00
parent dd32efd5a4
commit 2bb01b4a63
18 changed files with 90 additions and 41 deletions

View File

@@ -1,17 +1,23 @@
<template>
<demo-section>
<demo-block :title="$t('loadingType')">
<demo-block :title="$t('type')">
<van-loading />
<van-loading type="spinner" />
</demo-block>
<demo-block :title="$t('loadingColor')">
<demo-block :title="$t('color')">
<van-loading color="#1989fa" />
<van-loading
type="spinner"
color="#1989fa"
/>
</demo-block>
<demo-block :title="$t('text')">
<van-loading size="24px">
{{ $t('loading') }}
</van-loading>
</demo-block>
</demo-section>
</template>
@@ -19,12 +25,14 @@
export default {
i18n: {
'zh-CN': {
loadingType: '加载类型',
loadingColor: '自定义颜色'
type: '加载类型',
color: '自定义颜色',
text: '加载文案'
},
'en-US': {
loadingType: 'Type',
loadingColor: 'Color'
type: 'Type',
color: 'Color',
text: 'Text'
}
}
};