数据绑定不适用于paper-input
,即此代码不执行任何数据绑定:
<paper-input
always-float-label
label="Search nodes"
value="{{userSearchText}}">
</paper-input>
(我不在表单中使用它。)
使用iron-input
和input
(由于m4b)的等效代码可以正确进行数据绑定:
<paper-item>Search nodes:</paper-item>
<div>
<iron-input bind-value="{{userSearchText}}">
<input value="{{userSearchText::input}}">
</iron-input>
</div>
我不确定我的凉亭安装是否被某种方式弄乱了。这是我现在在bower_components下获得的版本:
paper-input: 2.2.3
iron-input: 1.0.11
请让我知道您还需要什么其他信息。
更新:添加bower.json
{
"name": "abc-view",
"main": "index.html",
"version": "0.0.1",
"dependencies": {
"polymer": "Polymer/polymer#2.6.0",
"highcharts": "6.0.6",
"highcharts-chart": "avdaredevil/highcharts-chart#2.0.1",
"iron-icons": "PolymerElements/iron-icons#2",
"paper-icon-button": "PolymerElements/paper-icon-button#2",
"iron-image": "PolymerElements/iron-image#^2",
"iron-icon": "PolymerElements/iron-icon#2",
"paper-item": "PolymerElements/paper-item#2",
"iron-selector": "PolymerElements/iron-selector#2",
"paper-checkbox": "PolymerElements/paper-checkbox#2",
"vaadin-grid": "#3",
"vaadin-date-picker": "#2",
"vaadin-combo-box": "#3",
"paper-button": "PolymerElements/paper-button#2",
"paper-input": "#2",
"paper-fab": "#2",
"paper-card": "PolymerElements/paper-card#2",
"paper-progress": "PolymerElements/paper-progress#2",
"paper-dialog": "PolymerElements/paper-dialog#2",
"paper-spinner": "^2.1.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#2",
"iron-form": "PolymerElements/iron-form#2",
"paper-toast": "#2",
"neon-animation": "PolymerElements/neon-animation#2",
"paper-tooltip": "PolymerElements/paper-tooltip#2",
"paper-listbox": "PolymerElements/paper-listbox#2",
"iron-pages": "PolymerElements/iron-pages#2",
"paper-menu-button": "#2",
"company-env": "ssh://stash.acme.com/proj24474/company-env.git#1",
"company-ajax": "ssh://stash.acme.com/proj24474/company-ajax.git#1",
"paper-radio-group": "#2",
"paper-radio-button": "#2",
"paper-tags-input": "paper-tags-input#1",
"paper-tabs": "PolymerElements/paper-tabs#2",
"paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#2",
"iron-collapse": "#2",
"web-animations-js": "#2",
"vaadin-material-theme": "ssh://stash.acme.com/proj1011/vaadin-material-theme.git#^0.6.0"
},
"devDependencies": {
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2",
"web-component-tester": "Polymer/web-component-tester#^6",
"webcomponentsjs": "webcomponents/webcomponentsjs#^1"
},
"resolutions": {
"polymer": "2.6.0",
"paper-icon-button": "2",
"iron-flex-layout": "2",
"iron-icon": "2",
"webcomponentsjs": "^1",
"paper-input": "2",
"iron-a11y-keys-behavior": "1 - 2",
"iron-a11y-announcer": "1 - 2",
"vaadin-material-theme": "^0.6.0",
"vaadin-combo-box": "3",
"highcharts": "6.0.6",
"iron-meta": "1 - 2",
"vaadin-control-state-mixin": "^1.1.4",
"vaadin-text-field": "^2.0.0",
"vaadin-overlay": "^1.2.2"
}
}