feat(DropdownMenu): add @dropdown-menu-box-shadow var

This commit is contained in:
chenjiahan
2020-07-31 20:09:57 +08:00
parent 69ac602bc2
commit 6d0c54e8f4
5 changed files with 39 additions and 10 deletions

View File

@@ -11,8 +11,16 @@
<van-dropdown-menu>
<van-dropdown-item v-model="value1" :options="option1" />
<van-dropdown-item :title="t('itemTitle')" ref="item">
<van-switch-cell v-model="switch1" :title="t('switchTitle1')" />
<van-switch-cell v-model="switch2" :title="t('switchTitle2')" />
<van-cell center :title="t('switchTitle1')">
<template #right-icon>
<van-switch v-model="switch1" size="24" :active-color="RED" />
</template>
</van-cell>
<van-cell center :title="t('switchTitle2')">
<template #right-icon>
<van-switch v-model="switch2" size="24" :active-color="RED" />
</template>
</van-cell>
<div style="padding: 5px 16px;">
<van-button
type="danger"
@@ -29,7 +37,7 @@
</demo-block>
<demo-block :title="t('customActiveColor')">
<van-dropdown-menu active-color="#ee0a24">
<van-dropdown-menu :active-color="BLUE">
<van-dropdown-item v-model="value1" :options="option1" />
<van-dropdown-item v-model="value2" :options="option2" />
</van-dropdown-menu>
@@ -52,6 +60,8 @@
</template>
<script>
import { RED, BLUE } from '../../utils/constant';
export default {
i18n: {
'zh-CN': {
@@ -96,6 +106,8 @@ export default {
data() {
return {
RED,
BLUE,
switch1: true,
switch2: false,
value1: 0,