mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-22 22:49:16 +08:00
[improvement] remove unworked button props (#870)
This commit is contained in:
parent
dcc7396b06
commit
5f87de0803
@ -75,8 +75,6 @@
|
|||||||
| square | 是否为方形按钮 | `Boolean` | `false` |
|
| square | 是否为方形按钮 | `Boolean` | `false` |
|
||||||
| open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `String` | - |
|
| open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `String` | - |
|
||||||
| app-parameter | 打开 APP 时,向 APP 传递的参数 | `String` | - |
|
| app-parameter | 打开 APP 时,向 APP 传递的参数 | `String` | - |
|
||||||
| hover-start-time | 按住后多久出现点击态,单位毫秒 | `Number` | 20 |
|
|
||||||
| hover-stay-time | 手指松开后点击态保留时间,单位毫秒 | `Number` | 70 |
|
|
||||||
| lang | 指定返回用户信息的语言,zh_CN 简体中文,<br>zh_TW 繁体中文,en 英文 | `String` | `en` |
|
| lang | 指定返回用户信息的语言,zh_CN 简体中文,<br>zh_TW 繁体中文,en 英文 | `String` | `en` |
|
||||||
| session-from | 会话来源 | `String` | - |
|
| session-from | 会话来源 | `String` | - |
|
||||||
| send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
|
| send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
|
||||||
|
@ -27,7 +27,7 @@ VantComponent({
|
|||||||
computed: {
|
computed: {
|
||||||
classes(): string {
|
classes(): string {
|
||||||
const { type, size, block, plain, round, square, loading, disabled } = this.data;
|
const { type, size, block, plain, round, square, loading, disabled } = this.data;
|
||||||
return this.classNames(`van-button--${type}`, `van-button--${size}`, {
|
return this.classNames('custom-class', 'van-button', `van-button--${type}`, `van-button--${size}`, {
|
||||||
'van-button--block': block,
|
'van-button--block': block,
|
||||||
'van-button--round': round,
|
'van-button--round': round,
|
||||||
'van-button--plain': plain,
|
'van-button--plain': plain,
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<button
|
<button
|
||||||
id="{{ id }}"
|
id="{{ id }}"
|
||||||
lang="{{ lang }}"
|
lang="{{ lang }}"
|
||||||
class="custom-class van-button {{ classes }}"
|
class="{{ classes }}"
|
||||||
open-type="{{ openType }}"
|
open-type="{{ openType }}"
|
||||||
app-parameter="{{ appParameter }}"
|
app-parameter="{{ appParameter }}"
|
||||||
hover-stay-time="{{ hoverStayTime }}"
|
|
||||||
hover-start-time="{{ hoverStartTime }}"
|
|
||||||
hover-stop-propagation="{{ hoverStopPropagation }}"
|
|
||||||
session-from="{{ sessionFrom }}"
|
session-from="{{ sessionFrom }}"
|
||||||
send-message-title="{{ sendMessageTitle }}"
|
send-message-title="{{ sendMessageTitle }}"
|
||||||
send-message-path="{{ sendMessagePath }}"
|
send-message-path="{{ sendMessagePath }}"
|
||||||
|
@ -9,9 +9,6 @@
|
|||||||
open-type="{{ openType }}"
|
open-type="{{ openType }}"
|
||||||
custom-class="custom-class"
|
custom-class="custom-class"
|
||||||
app-parameter="{{ appParameter }}"
|
app-parameter="{{ appParameter }}"
|
||||||
hover-stay-time="{{ hoverStayTime }}"
|
|
||||||
hover-start-time="{{ hoverStartTime }}"
|
|
||||||
hover-stop-propagation="{{ hoverStopPropagation }}"
|
|
||||||
session-from="{{ sessionFrom }}"
|
session-from="{{ sessionFrom }}"
|
||||||
send-message-title="{{ sendMessageTitle }}"
|
send-message-title="{{ sendMessageTitle }}"
|
||||||
send-message-path="{{ sendMessagePath }}"
|
send-message-path="{{ sendMessagePath }}"
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
open-type="{{ openType }}"
|
open-type="{{ openType }}"
|
||||||
custom-class="van-goods-action-icon"
|
custom-class="van-goods-action-icon"
|
||||||
app-parameter="{{ appParameter }}"
|
app-parameter="{{ appParameter }}"
|
||||||
hover-stay-time="{{ hoverStayTime }}"
|
|
||||||
hover-start-time="{{ hoverStartTime }}"
|
|
||||||
hover-stop-propagation="{{ hoverStopPropagation }}"
|
|
||||||
session-from="{{ sessionFrom }}"
|
session-from="{{ sessionFrom }}"
|
||||||
send-message-title="{{ sendMessageTitle }}"
|
send-message-title="{{ sendMessageTitle }}"
|
||||||
send-message-path="{{ sendMessagePath }}"
|
send-message-path="{{ sendMessagePath }}"
|
||||||
|
@ -79,8 +79,6 @@ Page({
|
|||||||
| loading | 是否显示为加载状态 | `Boolean` | `false` |
|
| loading | 是否显示为加载状态 | `Boolean` | `false` |
|
||||||
| open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `String` | - |
|
| open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `String` | - |
|
||||||
| app-parameter | 打开 APP 时,向 APP 传递的参数 | `String` | - |
|
| app-parameter | 打开 APP 时,向 APP 传递的参数 | `String` | - |
|
||||||
| hover-start-time | 按住后多久出现点击态,单位毫秒 | `Number` | 20 |
|
|
||||||
| hover-stay-time | 手指松开后点击态保留时间,单位毫秒 | `Number` | 70 |
|
|
||||||
| lang | 指定返回用户信息的语言,zh_CN 简体中文,<br>zh_TW 繁体中文,en 英文 | `String` | `en` |
|
| lang | 指定返回用户信息的语言,zh_CN 简体中文,<br>zh_TW 繁体中文,en 英文 | `String` | `en` |
|
||||||
| session-from | 会话来源 | `String` | - |
|
| session-from | 会话来源 | `String` | - |
|
||||||
| send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
|
| send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
|
||||||
@ -102,8 +100,6 @@ Page({
|
|||||||
| loading | 是否显示为加载状态 | `Boolean` | `false` |
|
| loading | 是否显示为加载状态 | `Boolean` | `false` |
|
||||||
| open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `String` | - |
|
| open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `String` | - |
|
||||||
| app-parameter | 打开 APP 时,向 APP 传递的参数 | `String` | - |
|
| app-parameter | 打开 APP 时,向 APP 传递的参数 | `String` | - |
|
||||||
| hover-start-time | 按住后多久出现点击态,单位毫秒 | `Number` | 20 |
|
|
||||||
| hover-stay-time | 手指松开后点击态保留时间,单位毫秒 | `Number` | 70 |
|
|
||||||
| lang | 指定返回用户信息的语言,zh_CN 简体中文,<br>zh_TW 繁体中文,en 英文 | `String` | `en` |
|
| lang | 指定返回用户信息的语言,zh_CN 简体中文,<br>zh_TW 繁体中文,en 英文 | `String` | `en` |
|
||||||
| session-from | 会话来源 | `String` | - |
|
| session-from | 会话来源 | `String` | - |
|
||||||
| send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
|
| send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
|
||||||
|
@ -7,15 +7,6 @@ export const button = Behavior({
|
|||||||
sendMessagePath: String,
|
sendMessagePath: String,
|
||||||
showMessageCard: String,
|
showMessageCard: String,
|
||||||
sendMessageTitle: String,
|
sendMessageTitle: String,
|
||||||
hoverStopPropagation: Boolean,
|
|
||||||
hoverStartTime: {
|
|
||||||
type: Number,
|
|
||||||
value: 20
|
|
||||||
},
|
|
||||||
hoverStayTime: {
|
|
||||||
type: Number,
|
|
||||||
value: 70
|
|
||||||
},
|
|
||||||
lang: {
|
lang: {
|
||||||
type: String,
|
type: String,
|
||||||
value: 'en'
|
value: 'en'
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
catch:touchmove="noop"
|
catch:touchmove="noop"
|
||||||
>
|
>
|
||||||
<!-- text only -->
|
<!-- text only -->
|
||||||
<view wx:if="{{ type === 'text' }}">{{ message }}</view>
|
<text wx:if="{{ type === 'text' }}">{{ message }}</text>
|
||||||
|
|
||||||
<!-- with icon -->
|
<!-- with icon -->
|
||||||
<block wx:else>
|
<block wx:else>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
custom-class="van-toast__loading"
|
custom-class="van-toast__loading"
|
||||||
/>
|
/>
|
||||||
<van-icon wx:else class="van-toast__icon" name="{{ type }}" />
|
<van-icon wx:else class="van-toast__icon" name="{{ type }}" />
|
||||||
<view wx:if="{{ message }}" class="van-toast__text">{{ message }}</view>
|
<text wx:if="{{ message }}" class="van-toast__text">{{ message }}</text>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</van-transition>
|
</van-transition>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user