textarea 进入二级页面返回后一系列操作失效(真机上失效,客户端不影响)
发布于 7 年前 作者 yang29 4906 次浏览 来自 问答

onShow:function(){

var that = this

var sis = wx.getStorageInfoSync()

that.setData({

currentsize: sis.currentSize,

limitsize: sis.limitSize,

})

wx.getClipboardData({

success: function (res) {

console.log(res)

if (!that.isEmpty(res.data.trim())) {

that.setData({

clipboarddata: res.data,

textarea: res.data,

textcount: res.data.trim().length,

})

} else {

that.setData({

clipboarddata: “”,

textcount: 0,

})

}

}

})

}

<textarea name=“textarea” style=“width:700rpx;height:35vh;“maxlength=”-1” show-confirm-bar="" cursor-spacing=“80” value="{{textarea}}" bindinput=“textareaTap”  placeholder-style=“font-size:30rpx; color:#bcbcbc;” placeholder=" 剪贴板内容不能为空" />

<textarea name=“textarea” style=“width:700rpx;height:35vh;“maxlength=”-1” show-confirm-bar="" cursor-spacing=“80” value="{{clipboarddata}}" bindinput=“textareaTap”  placeholder-style=“font-size:30rpx; color:#bcbcbc;” placeholder=" 剪贴板内容不能为空" />

回到顶部