Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-11-24 22:21:28 +08:00
6 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
### 介绍
弹出式的气泡菜单。
弹出式的气泡菜单2.11 版本开始支持此组件
### 引入
+3 -2
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>
);
};
+4
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;
@@ -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`] = `