小程序
小游戏
企业微信
微信支付
扫描小程序码分享
首先,在textarea上绑定了bindlinechange事件,
然后,在其它手机上:
初始化时,自动触发bindlinechange, lineCount变为1 √
输入换行时,再次触发bindlinechange, lineCount变为2 √
完美!
在我的手机上:
输入换行时,没有任何反应 ×
再次辛苦尝试,仍然没有任何反应 ×
为什么?
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
请问下 这个问题你解决了吗
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
// 输入框行数变换 lineChange: function(e) { let that = this; if (e.detail.lineCount == 2) { that.setData({ lineHeight: true }) } else { that.setData({ lineHeight: false }) } },
在开发工具上是没问题的,但是到真机上就没用,还是默认的lineheight
你好,麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),方便定位问题
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
请问下 这个问题你解决了吗
// 输入框行数变换 lineChange: function(e) { let that = this; if (e.detail.lineCount == 2) { that.setData({ lineHeight: true }) } else { that.setData({ lineHeight: false }) } },
在开发工具上是没问题的,但是到真机上就没用,还是默认的lineheight
你好,麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),方便定位问题