Giter Site home page Giter Site logo

textarea 无法初始化值 about chameleon HOT 1 OPEN

striveniu avatar striveniu commented on June 13, 2024
textarea 无法初始化值

from chameleon.

Comments (1)

zhaoyinpan2 avatar zhaoyinpan2 commented on June 13, 2024

bug描述
web端textarea无法初始化值。<textarea value="{{textValue}}" >{{textValue}}</textarea>

复现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 版本:[email protected]
  • nodejs版本、npm版本:node:v12.20.1 npm:6.14.10
  • 电脑操作系统: macOS Catalina 10.15.7

运行环境信息

  • 端版本:macOS Chrome浏览器 90.0.4430.212

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

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

from chameleon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.