textarea在onload中setData后仍显示初始值

发布于 7 年前作者 mingshen13736 次浏览最后编辑 7 年前来自 ask
<!--index.wxml-->
  <navigator url="../index/index?code=00001111" open-type='redirect' style="width:50px;height:50px;">Go</navigator>
 
    <text >{{motto}}</text>
    <input value="{{motto}}"></input>
    <textarea value="{{motto}}"></textarea>
//index.js
Page({
  data: {
    motto: 'Hello World'
  },
  onLoad: function (options) {
      if (options.code){
          this.setData({motto: options.code});
      }
  }
})

在安卓真机出现问题,textarea仍显示为Hello World

1 回复
junye
junye1 楼5 年前

有没有感兴趣的朋友验证一下?[滑稽]