uni.prompt.showContextMenu 的用法?

openMenu: function () {  
let _this = this;  
            uni.prompt.showContextMenu({  
                itemList: this.issueList,  
                itemColor: '#727272',  
                success: function (data) {  
                    _this.issueType = data.index  
                }  
            })  
        }
2018-04-24 15:31 负责人:无  分享
 
侯凯华

侯凯华 (作者)

我看了下快应用的demo,他的好像都能调函数了

复制代码  prompt.showContextMenu({  
    itemList: ['保存桌面', '关于', '取消'],  
    success: function (ret) {  
      switch (ret.index) {  
      case 0:  
        // 保存桌面  
        createShortcut()  
        break  
      case 1:  
        // 关于  
        router.push({  
          uri: '/About',  
          params: {  
            name: appInfo.name,  
            icon: appInfo.icon  
          }  
        })  
        break  
      case 2:  
        // 取消  
        break  
      default:  
        prompt.showToast({  
          message: 'error'  
        })  
      }  
    }  
  })
posted @ 2022-04-19 14:31  疯子110  阅读(58)  评论(0编辑  收藏  举报