#561·chameleon

textarea 无法初始化值

Author: striveniuCreated May 15, 2021Updated May 22, 2021
Labelsbug

bug描述 web端textarea无法初始化值。

复现bug的步骤

  1. 直接在页面定义textValue值,然后定义textarea组件,设置value=textValue
  2. 进入页面无法初始化值

如下为示例代码

javascript
<template>
  <page title="chameleon">
      <scroller height="{{-1}}">
        <view class="scroller-wrap">
          <textarea value="{{textValue}}" >{{textValue}}</textarea>
        </view>
      </scroller>
  </page>
</template>
<script>
class Index  {
  data = {
    title: "chameleon",
    textValue: "this is a test"
  }
  methods = {
    bindblurevent() {
      console.log('blur');
      this.isfocus = false;
    },
  };
}
export default new Index();
</script>

问题截图 只是一个空的textarea

编译环境信息

  • chameleon-tool 版本:[email protected]
  • nodejs版本、npm版本:node:v12.20.1 npm:6.14.10
  • 电脑操作系统: macOS Catalina 10.15.7

运行环境信息

  • 端版本:macOS Chrome浏览器 90.0.4430.212