From 5f87de0803f14c3815a493d9b69dbe09a7ba59ff Mon Sep 17 00:00:00 2001
From: neverland <chenjiahan@buaa.edu.cn>
Date: Tue, 6 Nov 2018 21:41:27 +0800
Subject: [PATCH] [improvement] remove unworked button props (#870)

---
 packages/button/README.md               | 2 --
 packages/button/index.ts                | 2 +-
 packages/button/index.wxml              | 5 +----
 packages/goods-action-button/index.wxml | 3 ---
 packages/goods-action-icon/index.wxml   | 3 ---
 packages/goods-action/README.md         | 4 ----
 packages/mixins/button.ts               | 9 ---------
 packages/toast/index.wxml               | 4 ++--
 8 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/packages/button/README.md b/packages/button/README.md
index 9249f7e6..adff5fe7 100644
--- a/packages/button/README.md
+++ b/packages/button/README.md
@@ -75,8 +75,6 @@
 | square | 是否为方形按钮 | `Boolean` | `false` |
 | open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `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` |
 | session-from | 会话来源 | `String` | - |
 | send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
diff --git a/packages/button/index.ts b/packages/button/index.ts
index 6907b78d..6ef1b0aa 100644
--- a/packages/button/index.ts
+++ b/packages/button/index.ts
@@ -27,7 +27,7 @@ VantComponent({
   computed: {
     classes(): string {
       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--round': round,
         'van-button--plain': plain,
diff --git a/packages/button/index.wxml b/packages/button/index.wxml
index acb6693b..bacf0752 100644
--- a/packages/button/index.wxml
+++ b/packages/button/index.wxml
@@ -1,12 +1,9 @@
 <button
   id="{{ id }}"
   lang="{{ lang }}"
-  class="custom-class van-button {{ classes }}"
+  class="{{ classes }}"
   open-type="{{ openType }}"
   app-parameter="{{ appParameter }}"
-  hover-stay-time="{{ hoverStayTime }}"
-  hover-start-time="{{ hoverStartTime }}"
-  hover-stop-propagation="{{ hoverStopPropagation }}"
   session-from="{{ sessionFrom }}"
   send-message-title="{{ sendMessageTitle }}"
   send-message-path="{{ sendMessagePath }}"
diff --git a/packages/goods-action-button/index.wxml b/packages/goods-action-button/index.wxml
index 69c838dd..275e15ea 100644
--- a/packages/goods-action-button/index.wxml
+++ b/packages/goods-action-button/index.wxml
@@ -9,9 +9,6 @@
   open-type="{{ openType }}"
   custom-class="custom-class"
   app-parameter="{{ appParameter }}"
-  hover-stay-time="{{ hoverStayTime }}"
-  hover-start-time="{{ hoverStartTime }}"
-  hover-stop-propagation="{{ hoverStopPropagation }}"
   session-from="{{ sessionFrom }}"
   send-message-title="{{ sendMessageTitle }}"
   send-message-path="{{ sendMessagePath }}"
diff --git a/packages/goods-action-icon/index.wxml b/packages/goods-action-icon/index.wxml
index 58b17ee2..ddc8ced7 100644
--- a/packages/goods-action-icon/index.wxml
+++ b/packages/goods-action-icon/index.wxml
@@ -8,9 +8,6 @@
   open-type="{{ openType }}"
   custom-class="van-goods-action-icon"
   app-parameter="{{ appParameter }}"
-  hover-stay-time="{{ hoverStayTime }}"
-  hover-start-time="{{ hoverStartTime }}"
-  hover-stop-propagation="{{ hoverStopPropagation }}"
   session-from="{{ sessionFrom }}"
   send-message-title="{{ sendMessageTitle }}"
   send-message-path="{{ sendMessagePath }}"
diff --git a/packages/goods-action/README.md b/packages/goods-action/README.md
index f75b1180..764eb596 100644
--- a/packages/goods-action/README.md
+++ b/packages/goods-action/README.md
@@ -79,8 +79,6 @@ Page({
 | loading | 是否显示为加载状态 | `Boolean` | `false` |
 | open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `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` |
 | session-from | 会话来源 | `String` | - |
 | send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
@@ -102,8 +100,6 @@ Page({
 | loading | 是否显示为加载状态 | `Boolean` | `false` |
 | open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `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` |
 | session-from | 会话来源 | `String` | - |
 | send-message-title | 会话内消息卡片标题 | `String` | 当前标题 |
diff --git a/packages/mixins/button.ts b/packages/mixins/button.ts
index a83e3e76..f6b5e9c6 100644
--- a/packages/mixins/button.ts
+++ b/packages/mixins/button.ts
@@ -7,15 +7,6 @@ export const button = Behavior({
     sendMessagePath: String,
     showMessageCard: String,
     sendMessageTitle: String,
-    hoverStopPropagation: Boolean,
-    hoverStartTime: {
-      type: Number,
-      value: 20
-    },
-    hoverStayTime: {
-      type: Number,
-      value: 70
-    },
     lang: {
       type: String,
       value: 'en'
diff --git a/packages/toast/index.wxml b/packages/toast/index.wxml
index 1f1bf96e..1158d2e1 100644
--- a/packages/toast/index.wxml
+++ b/packages/toast/index.wxml
@@ -14,7 +14,7 @@
     catch:touchmove="noop"
   >
     <!-- text only -->
-    <view wx:if="{{ type === 'text' }}">{{ message }}</view>
+    <text wx:if="{{ type === 'text' }}">{{ message }}</text>
 
     <!-- with icon -->
     <block wx:else>
@@ -25,7 +25,7 @@
         custom-class="van-toast__loading"
       />
       <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>
   </view>
 </van-transition>