简体   繁体   中英

is there any way to set char-counter maxlength dynamically for paper-input

我想为不同的数据设置不同的maxlength,我尝试通过在maxlength中编写一个方法来尝试,但是它没有用,所以还有其他可能性吗

<paper-input label="{{data.name}}" id="input" char-counter maxlength="getMaxLength()"></paper-input>

use a property and set max length to property:

   <paper-input label="{{data.name}}" id="input" char-counter maxlength="[[maxValue]]"></paper-input>

use a method and return value from method:

   <paper-input label="{{data.name}}" id="input" char-counter maxlength="[[getMaxLength()]]"></paper-input>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM