mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Merge branch '2.x' into dev
This commit is contained in:
commit
16c3539203
@ -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;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### 介绍
|
||||
|
||||
弹出式的气泡菜单。
|
||||
弹出式的气泡菜单,2.11 版本开始支持此组件。
|
||||
|
||||
### 引入
|
||||
|
||||
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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`] = `
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user