Skip to content

[Bug 上报] wd-textarea的placeholder无法设置为空值 #471

@xiaoland

Description

@xiaoland

Wot Design Uni 版本号

1.3.5

平台

微信小程序

复现Demo地址

https://gist.github.com/xiaoland/679c913c69493c5e973ae1b67f8a5633

重现步骤

<wd-textarea id="content-editor"
        v-model="content"
        :placeholder="''"
 />

期望的结果是什么?

image

实际的结果是什么?

image

环境信息

  • uni-mp-weixin: 3.0.0-4020420240722002
  • uni-app: 3.0.0-4020420240722002
  • Device: iPhoneX(WeixinMP Dev Tools Simulator)

其他补充信息

问题在于源码中对placeholder的处理,使用||运算符判断是否为 空字符串、null、undefined等等都会被替换为翻译后的默认placeholder

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions