diff --git a/pages/API/action-sheet/action-sheet.uvue b/pages/API/action-sheet/action-sheet.uvue index bfb86b8c147b9af3e0d803d520321c570f90800b..2c86c7ae21179a7f53d51f469cffbc32d8bbee6e 100644 --- a/pages/API/action-sheet/action-sheet.uvue +++ b/pages/API/action-sheet/action-sheet.uvue @@ -19,6 +19,10 @@ 超长列表文本 + + 大量选项 + + @@ -38,6 +42,7 @@ title: 'action-sheet', itemColorCustom:false, itemContentLarge:false, + itemNumLargeSelect:false, items: [{ value: '标题', name: '有标题' @@ -81,12 +86,21 @@ itemColorChange: function (e : SwitchChangeEvent) { this.itemColorCustom = e.detail.value }, + itemNumLargeChange: function (e : SwitchChangeEvent) { + this.itemNumLargeSelect = e.detail.value + }, actionSheetTap() { let itemInfo = ['item1', 'item2', 'item3', 'item4'] if(this.itemContentLarge){ itemInfo = ['两个黄鹂鸣翠柳,一行白鹭上青天。窗含西岭千秋雪,门泊东吴万里船', '水光潋滟晴方好,山色空蒙雨亦奇。 欲把西湖比西子,淡妆浓抹总相宜', ''] + }else if(this.itemNumLargeSelect){ + // 大量选项测试,不能超过6个元素 https://uniapp.dcloud.net.cn/api/ui/prompt.html#showactionsheet + itemInfo = [] + for (var i = 1; i <= 10; i++) { + itemInfo.push('两个黄鹂鸣翠柳,一行白鹭上青天'); + } } const that = this @@ -108,7 +122,10 @@ title: "点击了第" + e.tapIndex + "个选项", icon: "none" }) - } + }, + fail: (e) => { + console.log(e); + } }) }else{ uni.showActionSheet({ diff --git a/pages/API/show-loading/show-loading.uvue b/pages/API/show-loading/show-loading.uvue index a9aa706d272922633f154d136c8edd12a5ac8864..645b1aa6ddbc95134a52a7154d20970e89063feb 100644 --- a/pages/API/show-loading/show-loading.uvue +++ b/pages/API/show-loading/show-loading.uvue @@ -3,7 +3,7 @@ - 是否显示透明蒙层 + 是否显示透明蒙层-屏蔽点击事件 @@ -69,6 +69,7 @@ // #ifdef MP-ALIPAY , onUnload() { + // 页面卸载的时候,手动关闭loading this._showTimer && clearTimeout(this._showTimer); } // #endif