消息提示框
示例代码:
"body-view">
"body-view"
>
"{{toast1Hidden}}" bindchange="toast1Change">
"{{toast1Hidden}}"
bindchange=
"toast1Change"
默认
"default" bindtap="toast1Tap">点击弹出默认toast
"default"
bindtap=
"toast1Tap"
>点击弹出默认toast
"{{toast2Hidden}}" duration="3000" bindchange="toast2Change">
"{{toast2Hidden}}"
duration=
"3000"
"toast2Change"
设置duration
"default" bindtap="toast2Tap">点击弹出设置duration的toast
"toast2Tap"
>点击弹出设置duration的toast
var
toastNum = 2
pageData = {}
pageData.data = {}
for
(
i = 0; i <= toastNum; ++i) {
pageData.data[
‘toast‘
+i+
‘Hidden‘
] =
true
;
function
(index) {
pageData[
+index+
‘Change‘
(e) {
obj = {}
obj[
this
.setData(obj)
}
‘Tap‘
false
})(i)
Page(pageData)
微信小程序 toast