提交 0acb2f23 编写于 作者: 杜庆泉's avatar 杜庆泉

prompt 增加 onload 调用示例

上级 421fac61
...@@ -57,6 +57,12 @@ ...@@ -57,6 +57,12 @@
] as ItemType[], ] as ItemType[],
current: 0, current: 0,
} }
},
onLoad(){
uni.showActionSheet({
title: "onLoad 调用示例,请手动取消",
itemList:['item1', 'item2'],
})
}, },
methods: { methods: {
radioChange(e : RadioGroupChangeEvent) { radioChange(e : RadioGroupChangeEvent) {
...@@ -82,8 +88,8 @@ ...@@ -82,8 +88,8 @@
if (this.itemContentLarge) { if (this.itemContentLarge) {
itemInfo = ['两个黄鹂鸣翠柳,一行白鹭上青天。窗含西岭千秋雪,门泊东吴万里船', '水光潋滟晴方好,山色空蒙雨亦奇。 欲把西湖比西子,淡妆浓抹总相宜', ''] itemInfo = ['两个黄鹂鸣翠柳,一行白鹭上青天。窗含西岭千秋雪,门泊东吴万里船', '水光潋滟晴方好,山色空蒙雨亦奇。 欲把西湖比西子,淡妆浓抹总相宜', '']
} }
if (this.itemNumLargeSelect) { if (this.itemNumLargeSelect) {
// 大量选项测试,不能超过6个元素 https://uniapp.dcloud.net.cn/api/ui/prompt.html#showactionsheet // 大量选项测试,不能超过6个元素 https://uniapp.dcloud.net.cn/api/ui/prompt.html#showactionsheet
itemInfo = [] itemInfo = []
......
...@@ -58,6 +58,14 @@ ...@@ -58,6 +58,14 @@
titleSelect: "null" titleSelect: "null"
} }
}, },
onLoad(){
uni.showLoading({
title:'onLoad 调用示例,1秒后消失'
})
setTimeout(function() {
uni.hideLoading()
}, 1000);
},
methods: { methods: {
radioChange(e : RadioGroupChangeEvent) { radioChange(e : RadioGroupChangeEvent) {
......
...@@ -79,6 +79,12 @@ ...@@ -79,6 +79,12 @@
current: 0 current: 0
} }
}, },
onLoad(){
uni.showModal({
title: "onLoad 调用示例,请手动取消",
showCancel:false
})
},
methods: { methods: {
showCancelChange: function (e : SwitchChangeEvent) { showCancelChange: function (e : SwitchChangeEvent) {
this.showCancelSelect = e.detail.value this.showCancelSelect = e.detail.value
......
...@@ -27,6 +27,14 @@ ...@@ -27,6 +27,14 @@
exeRet: '' exeRet: ''
} }
}, },
onLoad(){
uni.showToast({
title:'onLoad 调用示例,1秒后消失'
})
setTimeout(function() {
uni.hideToast()
}, 1000);
},
methods: { methods: {
toast1Tap: function () { toast1Tap: function () {
uni.showToast({ uni.showToast({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册