wechat miniprogram dialog
1.0
git clone https://github.com/simsir-lin/wechat-miniprogram-dialog.git
npm install --save wechat-miniprogram-dialog
{
"usingComponents" : {
"dialog" : "wechat-miniprogram-dialog"
}
}
< dialog > </ dialog >
npm install
npm run dev
name | description | type | default value |
---|---|---|---|
title | title | String | hint |
width | width | String | 650rpx |
opacity | Modal layer transparency | Number | 0.4 |
closeOnClickModal | Is it possible to close the pop-up window by clicking on the modal layer? | Boolean | false |
animation | Turn on animation | Boolean | true |
confirmText | OK button text | String | Sure |
cancelText | Cancel button text | String | Cancel |
confirmColor | Determine the text color of the button | String | #333333(support RGBA) |
cancelColor | Cancel button text color | String | #999999(support RGBA) |
showConfirm | Whether to display the OK button | Boolean | true |
showCancel | Whether to display a cancel button | Boolean | true |
confirmBackgroundColor | Determine button background color | String | #ffffff(supports RGBA) |
cancelBackgroundColor | Cancel button background color | String | #ffffff(supports RGBA) |
confirmOpenType | To determine the WeChat opening capabilities of the button, please refer to https://developers.weixin.qq.com/miniprogram/dev/component/button.html | String | |
cancelOpenType | To cancel the WeChat open button button, please refer to https://developers.weixin.qq.com/miniprogram/dev/component/button.html | String | |
loading | Check whether the confirmation button has a loading icon | Boolean | true |
gatherFormId | Whether to collect formId | Boolean | true |
appParameter | When opening the APP, the parameters passed to the APP are valid when *-open-type="launchApp" | String | |
sessionFrom | Session source, valid when *-open-type="contact" | String | |
position | Position, including center, top, bottom | String | center |
name | description | parameters |
---|---|---|
open | when the window opens | |
close | when the window is closed | |
cancel | Click Cancel | |
confirm | Click to confirm | |
getFormId | Get formid | event.detail.formId |
getuserinfo | When the button is clicked, the obtained user information will be returned, valid when *-open-type="getUserInfo" | event.detail |
contact | Customer service message callback, valid when *-open-type="contact" | |
getphonenumber | Callback to get the user's mobile phone number, valid when *-open-type="getPhoneNumber" | event.detail |
opensetting | Called after opening the authorization setting page, valid when *-open-type="openSetting" | |
launchapp | Callback for successful opening of APP, valid when *-open-type="launchApp" |
If you have any good comments or suggestions, please feel free to raise an issue with me!