chameleon textarea 无法初始化值

vltsax25  于 2021-12-01  发布在  Java
关注(0)|答案(1)|浏览(227)

bug描述

web端textarea无法初始化值。{{textValue}}

复现bug的步骤

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

如下为示例代码

<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 版本:chameleon-tool@1.0.8
  • nodejs版本、npm版本:node:v12.20.1 npm:6.14.10
  • 电脑操作系统: macOS Catalina 10.15.7

运行环境信息

  • 端版本:macOS Chrome浏览器 90.0.4430.212
x9ybnkn6

x9ybnkn61#

我试了你的代码,没有问题的

1.clm需要用c-bind:input更改textValue的值
2.你需要设置下textarea的宽度(误以为没初始值)

相关问题