feat(DropdownMenu): add box shadow (#3723)

This commit is contained in:
neverland 2020-11-02 19:11:42 +08:00 committed by GitHub
parent 504e586670
commit 76acc72e20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 8 deletions

View File

@ -1,11 +1,11 @@
<demo-block custom-class="white" title="基础用法" padding>
<demo-block custom-class="white" title="基础用法">
<van-dropdown-menu>
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" />
<van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" />
</van-dropdown-menu>
</demo-block>
<demo-block custom-class="white" title="自定义菜单内容" padding>
<demo-block custom-class="white" title="自定义菜单内容">
<van-dropdown-menu>
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" />
<van-dropdown-item id="item" title="{{ itemTitle }}">
@ -34,21 +34,21 @@
</van-dropdown-menu>
</demo-block>
<demo-block custom-class="white" title="自定义选中状态颜色" padding>
<demo-block custom-class="white" title="自定义选中状态颜色">
<van-dropdown-menu active-color="#ee0a24">
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" />
<van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" />
</van-dropdown-menu>
</demo-block>
<demo-block custom-class="white" title="向上展开" padding>
<demo-block custom-class="white" title="向上展开">
<van-dropdown-menu direction="up">
<van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" />
<van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" />
</van-dropdown-menu>
</demo-block>
<demo-block custom-class="white" title="禁用菜单" padding>
<demo-block custom-class="white" title="禁用菜单">
<van-dropdown-menu>
<van-dropdown-item value="{{ value1 }}" disabled options="{{ option1 }}" />
<van-dropdown-item value="{{ value2 }}" disabled options="{{ option2 }}" />

View File

@ -1,3 +1 @@
page {
background-color: white;
}
/** empty */

View File

@ -3,6 +3,7 @@
.van-dropdown-menu {
display: flex;
box-shadow: 0 2px 12px fade(@gray-7, 12);
user-select: none;
.theme(height, '@dropdown-menu-height');
.theme(background-color, '@dropdown-menu-background-color');