Merge branch '2.x' into dev

This commit is contained in:
chenjiahan 2020-11-24 22:21:28 +08:00
commit 16c3539203
6 changed files with 15 additions and 7 deletions

View File

@ -1,6 +1,7 @@
@import '../style/var';
.van-nav-bar {
position: relative;
z-index: @nav-bar-z-index;
line-height: @line-height-lg;
text-align: center;

View File

@ -2,7 +2,7 @@
### 介绍
弹出式的气泡菜单。
弹出式的气泡菜单2.11 版本开始支持此组件
### 引入

View File

@ -127,13 +127,14 @@ export default createComponent({
const renderAction = (action, index) => {
const { icon, text, disabled, className } = action;
return (
<div
<button
type="button"
class={[bem('action', { disabled, 'with-icon': icon }), className]}
onClick={() => onClickAction(action, index)}
>
{icon && <Icon name={icon} class={bem('action-icon')} />}
<div class={[bem('action-text'), BORDER_BOTTOM]}>{text}</div>
</div>
</button>
);
};

View File

@ -34,6 +34,9 @@
padding: 0 @padding-md;
font-size: @popover-action-font-size;
line-height: @line-height-md;
background-color: transparent;
border: none;
cursor: pointer;
&:last-child {
.van-popover__action-text::after {
@ -212,6 +215,7 @@
&--disabled {
color: @popover-light-action-disabled-text-color;
cursor: not-allowed;
&:active {
background-color: transparent;

View File

@ -1,11 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should allow to custom the className of action 1`] = `
<div class="van-popover__action foo">
<button type="button"
class="van-popover__action foo"
>
<div class="van-popover__action-text van-hairline--bottom">
Option
</div>
</div>
</button>
`;
exports[`should locate to reference element when showed 1`] = `

View File

@ -3,7 +3,7 @@
<van-slider v-model="value1" @change="onChange" />
</demo-block>
<demo-block :title="t('title2')">
<demo-block v-if="!isWeapp" :title="t('title2')">
<van-slider range v-model="value2" @change="onChange" />
</demo-block>
@ -43,7 +43,7 @@
v-model="value9"
range
vertical
style="margin-left: 100px;"
style="margin-left: 100px"
@change="onChange"
/>
</div>