<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                #### button 按鈕。 | 屬性名 | 類型 | 默認值 | 說明 | 生效時機 | 最低版本 | | ---------------------- | ------- | ------------ | ---------------------------------------- | -------------------------- | ---------------------------------------- | | size | String | default | 按鈕的大小 | | | | type | String | default | 按鈕的樣式類型 | | | | plain | Boolean | false | 按鈕是否鏤空,背景色透明 | | | | disabled | Boolean | false | 是否禁用 | | | | loading | Boolean | false | 名稱前是否帶 loading 圖標 | | | | form-type | String | | 用于 `<form/>` 組件,點擊分別會觸發 `<form/>` 組件的 submit/reset 事件 | | | | open-type | String | | 微信開放能力 | | [1.1.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | app-parameter | String | | 打開 APP 時,向 APP 傳遞的參數 | open-type="launchApp" | [1.9.5](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | hover-class | String | button-hover | 指定按鈕按下去的樣式類。當 `hover-class="none"` 時,沒有點擊態效果 | | | | hover-stop-propagation | Boolean | false | 指定是否阻止本節點的祖先節點出現點擊態 | | [1.5.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | hover-start-time | Number | 20 | 按住后多久出現點擊態,單位毫秒 | | | | hover-stay-time | Number | 70 | 手指松開后點擊態保留時間,單位毫秒 | | | | bindgetuserinfo | Handler | | 用戶點擊該按鈕時,會返回獲取到的用戶信息,從返回參數的detail中獲取到的值同[wx.getUserInfo](https://mp.weixin.qq.com/debug/wxadoc/dev/api/open.html#wxgetuserinfoobject) | open-type="getUserInfo' | [1.3.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | lang | String | en | 指定返回用戶信息的語言,zh_CN 簡體中文,zh_TW 繁體中文,en 英文。 | open-type="getUserInfo" | [1.3.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | session-from | String | | 會話來源 | open-type="contact" | [1.4.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | send-message-title | String | 當前標題 | 會話內消息卡片標題 | open-type="contact" | [1.5.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | send-message-path | String | 當前分享路徑 | 會話內消息卡片點擊跳轉小程序路徑 | open-type="contact" | [1.5.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | send-message-img | String | 截圖 | 會話內消息卡片圖片 | open-type="contact" | [1.5.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | show-message-card | Boolean | false | 顯示會話內消息卡片 | open-type="contact" | [1.5.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | bindcontact | Handler | | 客服消息回調 | open-type="contact" | [1.5.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | bindgetphonenumber | Handler | | 獲取用戶手機號回調 | open-type="getphonenumber" | [1.2.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | binderrror | Handler | | 當使用開放能力時,發生錯誤的回調 | open-type="launchApp" | [1.9.5](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | - **注1:button-hover 默認為{background-color: rgba(0, 0, 0, 0.1); opacity: 0.7;}** - **注2:bindgetphonenumber 從1.2.0 開始支持,但是在1.5.3以下版本中無法使用wx.canIUse進行檢測,建議使用基礎庫版本進行判斷。** - **注3: 在bindgetphonenumber 等返回加密信息的回調中調用 wx.login 登錄,可能會刷新登錄態。此時服務器使用 code 換取的 sessionKey 不是加密時使用的 sessionKey,導致解密失敗。建議開發者提前進行 login;或者在回調中先使用 checkSession 進行登錄態檢查,避免 login 刷新登錄態。** **size 有效值:** | 值 | 說明 | | ------- | ---- | | default | | | mini | | **type 有效值:** | 值 | 說明 | | ------- | ---- | | primary | | | default | | | warn | | **form-type 有效值:** | 值 | 說明 | | ------ | ---- | | submit | 提交表單 | | reset | 重置表單 | **open-type 有效值:** | 值 | 說明 | 最低版本 | | -------------- | ---------------------------------------- | ---------------------------------------- | | contact | 打開客服會話 | [1.1.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | share | 觸發用戶轉發,使用前建議先閱讀[使用指引](https://mp.weixin.qq.com/debug/wxadoc/dev/api/share.html#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%BC%95) | [1.2.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | getUserInfo | 獲取用戶信息,可以從bindgetuserinfo回調中獲取到用戶信息 | [1.3.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | getPhoneNumber | 獲取用戶手機號,可以從bindgetphonenumber回調中獲取到用戶信息,[具體說明](https://mp.weixin.qq.com/debug/wxadoc/dev/api/getPhoneNumber.html) | [1.2.0](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | | launchApp | 打開APP,可以通過app-parameter屬性設定向APP傳的參數[具體說明](https://mp.weixin.qq.com/debug/wxadoc/dev/api/launchApp.html) | [1.9.5](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/compatibility.html) | **示例代碼:** ``` /** wxss **/ /** 修改button默認的點擊態樣式類**/ .button-hover { background-color: red; } /** 添加自定義button點擊態樣式類**/ .other-button-hover { background-color: blue; } <button type="default" size="{{defaultSize}}" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="default" hover-class="other-button-hover"> default </button> <button type="primary" size="{{primarySize}}" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="primary"> primary </button> <button type="warn" size="{{warnSize}}" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="warn"> warn </button> <button bindtap="setDisabled">點擊設置以上按鈕disabled屬性</button> <button bindtap="setPlain">點擊設置以上按鈕plain屬性</button> <button bindtap="setLoading">點擊設置以上按鈕loading屬性</button> <button open-type="contact">進入客服會話</button> var types = ['default', 'primary', 'warn'] var pageObject = { data: { defaultSize: 'default', primarySize: 'default', warnSize: 'default', disabled: false, plain: false, loading: false }, setDisabled: function(e) { this.setData({ disabled: !this.data.disabled }) }, setPlain: function(e) { this.setData({ plain: !this.data.plain }) }, setLoading: function(e) { this.setData({ loading: !this.data.loading }) } } for (var i = 0; i < types.length; ++i) { (function(type) { pageObject[type] = function(e) { var key = type + 'Size' var changedData = {} changedData[key] = this.data[key] === 'default' ? 'mini' : 'default' this.setData(changedData) } })(types[i]) } Page(pageObject) ``` :-: ![](http://xiaoyulive.oss-cn-beijing.aliyuncs.com/imgs/weixin/015.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看