mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(action-sheet): add custom class support (#5097)
* feat(action-sheet): add custom class support * fix(action-sheet): fix custom class doc error
This commit is contained in:
parent
a396085bef
commit
f4c71d3d56
@ -202,3 +202,10 @@ Page({
|
|||||||
| sendMessageImg | 会话内消息卡片图片,openType="contact"时有效 | _string_ | 截图 |
|
| sendMessageImg | 会话内消息卡片图片,openType="contact"时有效 | _string_ | 截图 |
|
||||||
| showMessageCard | 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效 | _string_ | `false` |
|
| showMessageCard | 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效 | _string_ | `false` |
|
||||||
| appParameter | 打开 APP 时,向 APP 传递的参数,openType=launchApp 时有效 | _string_ | - |
|
| appParameter | 打开 APP 时,向 APP 传递的参数,openType=launchApp 时有效 | _string_ | - |
|
||||||
|
|
||||||
|
### 外部样式类
|
||||||
|
|
||||||
|
| 类名 | 说明 |
|
||||||
|
| ------------ | -------------- |
|
||||||
|
| custom-class `v1.10.7` | 根节点样式类 |
|
||||||
|
| list-class `v1.10.7` | `actions`容器样式类 |
|
||||||
|
@ -2,6 +2,8 @@ import { VantComponent } from '../common/component';
|
|||||||
import { button } from '../mixins/button';
|
import { button } from '../mixins/button';
|
||||||
|
|
||||||
VantComponent({
|
VantComponent({
|
||||||
|
classes: ['list-class'],
|
||||||
|
|
||||||
mixins: [button],
|
mixins: [button],
|
||||||
props: {
|
props: {
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
round="{{ round }}"
|
round="{{ round }}"
|
||||||
z-index="{{ zIndex }}"
|
z-index="{{ zIndex }}"
|
||||||
overlay="{{ overlay }}"
|
overlay="{{ overlay }}"
|
||||||
custom-class="van-action-sheet"
|
custom-class="van-action-sheet custom-class"
|
||||||
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
|
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
|
||||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<view wx:if="{{ description }}" class="van-action-sheet__description van-hairline--bottom">
|
<view wx:if="{{ description }}" class="van-action-sheet__description van-hairline--bottom">
|
||||||
{{ description }}
|
{{ description }}
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{ actions && actions.length }}">
|
<view wx:if="{{ actions && actions.length }}" class="list-class">
|
||||||
<!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
|
<!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
|
||||||
<button
|
<button
|
||||||
wx:for="{{ actions }}"
|
wx:for="{{ actions }}"
|
||||||
|
@ -51,7 +51,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:close="toggleActionSheet1"
|
bind:close="toggleActionSheet1"
|
||||||
>
|
>
|
||||||
<van-popup
|
<van-popup
|
||||||
customClass="van-action-sheet"
|
customClass="van-action-sheet custom-class"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
<van-overlay
|
<van-overlay
|
||||||
@ -116,7 +116,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:close="toggleActionSheet2"
|
bind:close="toggleActionSheet2"
|
||||||
>
|
>
|
||||||
<van-popup
|
<van-popup
|
||||||
customClass="van-action-sheet"
|
customClass="van-action-sheet custom-class"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
<van-overlay
|
<van-overlay
|
||||||
@ -181,7 +181,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:close="toggleActionSheet3"
|
bind:close="toggleActionSheet3"
|
||||||
>
|
>
|
||||||
<van-popup
|
<van-popup
|
||||||
customClass="van-action-sheet"
|
customClass="van-action-sheet custom-class"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
<van-overlay
|
<van-overlay
|
||||||
@ -246,7 +246,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:close="toggleActionSheet4"
|
bind:close="toggleActionSheet4"
|
||||||
>
|
>
|
||||||
<van-popup
|
<van-popup
|
||||||
customClass="van-action-sheet"
|
customClass="van-action-sheet custom-class"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
<van-overlay
|
<van-overlay
|
||||||
@ -311,7 +311,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:close="toggleActionSheet5"
|
bind:close="toggleActionSheet5"
|
||||||
>
|
>
|
||||||
<van-popup
|
<van-popup
|
||||||
customClass="van-action-sheet"
|
customClass="van-action-sheet custom-class"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
<van-overlay
|
<van-overlay
|
||||||
@ -377,7 +377,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:getuserinfo="onGetUserInfo"
|
bind:getuserinfo="onGetUserInfo"
|
||||||
>
|
>
|
||||||
<van-popup
|
<van-popup
|
||||||
customClass="van-action-sheet"
|
customClass="van-action-sheet custom-class"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
<van-overlay
|
<van-overlay
|
||||||
|
Loading…
x
Reference in New Issue
Block a user