mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-23 18:00:27 +08:00
Merge branch '2.x' into dev
This commit is contained in:
commit
16c3539203
@ -1,6 +1,7 @@
|
|||||||
@import '../style/var';
|
@import '../style/var';
|
||||||
|
|
||||||
.van-nav-bar {
|
.van-nav-bar {
|
||||||
|
position: relative;
|
||||||
z-index: @nav-bar-z-index;
|
z-index: @nav-bar-z-index;
|
||||||
line-height: @line-height-lg;
|
line-height: @line-height-lg;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
### 介绍
|
### 介绍
|
||||||
|
|
||||||
弹出式的气泡菜单。
|
弹出式的气泡菜单,2.11 版本开始支持此组件。
|
||||||
|
|
||||||
### 引入
|
### 引入
|
||||||
|
|
||||||
|
@ -127,13 +127,14 @@ export default createComponent({
|
|||||||
const renderAction = (action, index) => {
|
const renderAction = (action, index) => {
|
||||||
const { icon, text, disabled, className } = action;
|
const { icon, text, disabled, className } = action;
|
||||||
return (
|
return (
|
||||||
<div
|
<button
|
||||||
|
type="button"
|
||||||
class={[bem('action', { disabled, 'with-icon': icon }), className]}
|
class={[bem('action', { disabled, 'with-icon': icon }), className]}
|
||||||
onClick={() => onClickAction(action, index)}
|
onClick={() => onClickAction(action, index)}
|
||||||
>
|
>
|
||||||
{icon && <Icon name={icon} class={bem('action-icon')} />}
|
{icon && <Icon name={icon} class={bem('action-icon')} />}
|
||||||
<div class={[bem('action-text'), BORDER_BOTTOM]}>{text}</div>
|
<div class={[bem('action-text'), BORDER_BOTTOM]}>{text}</div>
|
||||||
</div>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,6 +34,9 @@
|
|||||||
padding: 0 @padding-md;
|
padding: 0 @padding-md;
|
||||||
font-size: @popover-action-font-size;
|
font-size: @popover-action-font-size;
|
||||||
line-height: @line-height-md;
|
line-height: @line-height-md;
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
.van-popover__action-text::after {
|
.van-popover__action-text::after {
|
||||||
@ -212,6 +215,7 @@
|
|||||||
|
|
||||||
&--disabled {
|
&--disabled {
|
||||||
color: @popover-light-action-disabled-text-color;
|
color: @popover-light-action-disabled-text-color;
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`should allow to custom the className of action 1`] = `
|
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">
|
<div class="van-popover__action-text van-hairline--bottom">
|
||||||
Option
|
Option
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</button>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`should locate to reference element when showed 1`] = `
|
exports[`should locate to reference element when showed 1`] = `
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<van-slider v-model="value1" @change="onChange" />
|
<van-slider v-model="value1" @change="onChange" />
|
||||||
</demo-block>
|
</demo-block>
|
||||||
|
|
||||||
<demo-block :title="t('title2')">
|
<demo-block v-if="!isWeapp" :title="t('title2')">
|
||||||
<van-slider range v-model="value2" @change="onChange" />
|
<van-slider range v-model="value2" @change="onChange" />
|
||||||
</demo-block>
|
</demo-block>
|
||||||
|
|
||||||
@ -43,7 +43,7 @@
|
|||||||
v-model="value9"
|
v-model="value9"
|
||||||
range
|
range
|
||||||
vertical
|
vertical
|
||||||
style="margin-left: 100px;"
|
style="margin-left: 100px"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user