taro Button按钮组件
生活随笔
收集整理的這篇文章主要介紹了
taro Button按钮组件
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1、導(dǎo)入import {Button} from '@tarojs/components'2、使用<Button>按鈕名稱</Button>3、參數(shù)size "default" , "mini"type "default" , "primary" , "warn"plain 是否為樸素按鈕,背景色透明disabled loading 名稱前是否帶加載菊花動畫formType"submit" , "reset",用于<form/>組件openTypecontact 打開客服會話,如果用戶在會話中點擊消息卡片后返回小程序,可以從 bindcontact 回調(diào)中獲得具體信息contactShare share 觸發(fā)用戶轉(zhuǎn)發(fā),使用前建議先閱讀使用指引getRealnameAuthInfo getAuthorize getPhoneNumber 獲取用戶手機號,可以從 bindgetphonenumber 回調(diào)中獲取到用戶信息getUserInfo 獲取用戶信息,可以從 bindgetuserinfo 回調(diào)中獲取到用戶信息lifestyle launchApp 打開APP,可以通過app-parameter屬性設(shè)定向APP傳的參數(shù)openSetting 打開授權(quán)設(shè)置頁feedback 打開“意見反饋”頁面,用戶可提交反饋內(nèi)容并上傳日志,開發(fā)者可以登錄小程序管理后臺后進入左側(cè)菜單“客服反饋”頁面獲取到反饋內(nèi)容hoverClass 按鈕按下的樣式hoverStyle 按鈕按下的樣式hoverStopPropagation 布爾值hoverStartTime 按下多久出現(xiàn)點擊態(tài)hoverStayTime 松開點擊態(tài)保留多久lang"en" , "zh_CN" , "zh_TW" 指定返回用戶信息的語言,zh_CN 簡體中文,zh_TW 繁體中文,en 英文。生效時機:open-type="getUserInfo"sessionFrom string 會話來源,生效時機:open-type="contact"sendMessageTitlestring 會話內(nèi)消息卡片標題,生效時機:open-type="contact"sendMessagePathstring 會話內(nèi)消息卡片點擊跳轉(zhuǎn)小程序路徑,生效時機:open-type="contact"sendMessageImgstring 會話內(nèi)消息卡片圖片,生效時機:open-type="contact"appParameterstring 打開 APP 時,向 APP 傳遞的參數(shù),生效時機:open-type="launchApp"showMessageCardboolean 顯示會話內(nèi)消息卡片,生效時機:open-type="contact"onGetUserInfo用戶點擊該按鈕時,會返回獲取到的用戶信息,回調(diào)的detail數(shù)據(jù)與 Taro.getUserInfo 返回的一致,生效時機:open-type="getUserInfo"onGetPhoneNumber獲取用戶手機號回調(diào),生效時機:open-type="getphonenumber"onGetRealnameAuthInfo 獲取用戶實名,生效時機:open-type="getRealnameAuthInfo"onOpenSetting在打開授權(quán)設(shè)置頁后回調(diào),生效時機:open-type="openSetting"onLaunchapp獲取用戶實名,生效時機:open-type="launchApp"
總結(jié)
以上是生活随笔為你收集整理的taro Button按钮组件的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: series 锐捷rgrsr20_锐捷R
- 下一篇: hadoop组件---spark----