小编use*_*506的帖子

错误“找到3个具有非唯一ID #input的元素”

我在Chrome 63.0.3239.108(今天上午更新)中使用了Polymer,并且在启动Webapp时遇到了一些新错误:

    [DOM] Found 3 elements with non-unique id #input
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

    <div class="card-content" on-keypress="_keyHandler">
        <paper-input id="login" label="[[i18n('uid')]]"></paper-input>
        <paper-input id="pwd" label="[[i18n('pwd')]]" type="password"></paper-input>
        <paper-input id="server" label="[[i18n('server')]]"></paper-input>
    </div>
Run Code Online (Sandbox Code Playgroud)

是的,纸张输入元素具有相同的ID,但是我该怎么做才能消除此控制台错误?

非常感谢

html google-chrome unique-id polymer-1.0

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

google-chrome ×1

html ×1

polymer-1.0 ×1

unique-id ×1