docs(DropdownMenu): add demo of active-color (#4331)

This commit is contained in:
neverland
2019-09-03 10:05:11 +08:00
committed by GitHub
parent ad4f76bdbd
commit 9d941272d5
4 changed files with 51 additions and 2 deletions

View File

@@ -42,6 +42,19 @@
</van-dropdown-menu>
</demo-block>
<demo-block :title="$t('customActiveColor')">
<van-dropdown-menu active-color="#f44">
<van-dropdown-item
v-model="value1"
:options="option1"
/>
<van-dropdown-item
v-model="value2"
:options="option2"
/>
</van-dropdown-menu>
</demo-block>
<demo-block :title="$t('expandDirection')">
<van-dropdown-menu direction="up">
<van-dropdown-item
@@ -76,12 +89,13 @@
export default {
i18n: {
'zh-CN': {
customContent: '自定义菜单内容',
disableMenu: '禁用菜单',
switchTitle1: '包邮',
switchTitle2: '团购',
itemTitle: '筛选',
expandDirection: '向上展开',
customContent: '自定义菜单内容',
customActiveColor: '自定义选中态颜色',
option1: [
{ text: '全部商品', value: 0 },
{ text: '新款商品', value: 1 },
@@ -94,12 +108,13 @@ export default {
]
},
'en-US': {
customContent: 'Custom Content',
disableMenu: 'Disable Menu',
switchTitle1: 'Title',
switchTitle2: 'Title',
itemTitle: 'Title',
expandDirection: 'Expand Direction',
customContent: 'Custom Content',
customActiveColor: 'Custom Active Color',
option1: [
{ text: 'Option1', value: 0 },
{ text: 'Option2', value: 1 },