setClipboardData 报错

发布于 6 年前作者 chaolong13451 次浏览最后编辑 6 年前来自 ask
wx.setClipboardData({
  data: 'data',
  success: function(res) {
    wx.getClipboardData({
      success: function(res) {
        console.log(res.data) // data
      }
    })
  }
})

WAService.js:3 appServiceSDKScriptError

Cannot convert undefined or null to object;at api setClipboardData beforeSuccess callback function

TypeError: Cannot convert undefined or null to object

    at Function.constructor.keys (<anonymous>)

    at i (http://127.0.0.1:9973/appservice/\_\_dev\_\_/WAService.js:6:29933)

    at Function.beforeSuccess (http://127.0.0.1:9973/appservice/\_\_dev\_\_/WAService.js:6:29504)

    at Object.beforeSuccess (http://127.0.0.1:9973/appservice/\_\_dev\_\_/WAService.js:4:374)

    at Function.<anonymous> (http://127.0.0.1:9973/appservice/\_\_dev\_\_/WAService.js:3:29341)

    at Function.constructor.function.setTimeout (http://127.0.0.1:9973/appservice/appservice:1183:6881)

    at http://127.0.0.1:9973/appservice/\_\_dev\_\_/WAService.js:3:9996

3 回复
cxiao
cxiao1 楼6 年前

同问

juan27
juan272 楼6 年前

请问选了什么版本的基础库

taojie
taojie3 楼4 年前

 1.9