feat(ActionSheet): add description prop (#4691)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<van-action-sheet v-model="show2" close-on-click-action :actions="statusActions" />
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('title2')">
|
||||
<demo-block :title="$t('showCancel')">
|
||||
<van-button type="primary" @click="show3 = true">{{ $t('buttonText') }}</van-button>
|
||||
<van-action-sheet
|
||||
v-model="show3"
|
||||
@@ -21,9 +21,19 @@
|
||||
/>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('title3')">
|
||||
<demo-block :title="$t('showDescription')">
|
||||
<van-button type="primary" @click="show4 = true">{{ $t('buttonText') }}</van-button>
|
||||
<van-action-sheet v-model="show4" :title="$t('title')">
|
||||
<van-action-sheet
|
||||
v-model="show4"
|
||||
:actions="simpleActions"
|
||||
close-on-click-action
|
||||
:description="$t('description')"
|
||||
/>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('showTitle')">
|
||||
<van-button type="primary" @click="show5 = true">{{ $t('buttonText') }}</van-button>
|
||||
<van-action-sheet v-model="show5" :title="$t('title')">
|
||||
<p>{{ $t('content') }}</p>
|
||||
</van-action-sheet>
|
||||
</demo-block>
|
||||
@@ -37,19 +47,23 @@ export default {
|
||||
i18n: {
|
||||
'zh-CN': {
|
||||
buttonText: '弹出菜单',
|
||||
title2: '展示取消按钮',
|
||||
title3: '展示标题栏',
|
||||
status: '选项状态',
|
||||
description: '描述信息',
|
||||
disabledOption: '禁用选项'
|
||||
subname: '副文本',
|
||||
disabledOption: '禁用选项',
|
||||
showTitle: '展示标题栏',
|
||||
showCancel: '展示取消按钮',
|
||||
showDescription: '展示描述信息',
|
||||
description: '这是一段描述信息'
|
||||
},
|
||||
'en-US': {
|
||||
buttonText: 'Show ActionSheet',
|
||||
title2: 'ActionSheet with cancel button',
|
||||
title3: 'ActionSheet with title',
|
||||
status: 'Status',
|
||||
description: 'Description',
|
||||
disabledOption: 'Disabled Option'
|
||||
subname: 'Subname',
|
||||
disabledOption: 'Disabled Option',
|
||||
showTitle: 'ActionSheet with title',
|
||||
showCancel: 'ActionSheet with cancel button',
|
||||
showDescription: 'ActionSheet with description',
|
||||
description: 'Description'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -58,7 +72,8 @@ export default {
|
||||
show1: false,
|
||||
show2: false,
|
||||
show3: false,
|
||||
show4: false
|
||||
show4: false,
|
||||
show5: false
|
||||
};
|
||||
},
|
||||
|
||||
@@ -67,7 +82,7 @@ export default {
|
||||
return [
|
||||
{ name: this.$t('option') },
|
||||
{ name: this.$t('option') },
|
||||
{ name: this.$t('option'), subname: this.$t('description') }
|
||||
{ name: this.$t('option'), subname: this.$t('subname') }
|
||||
];
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user