我目前的代码是:
bower.json
{
"name": "test001",
"main": "index.html",
"dependencies": {
"polymer": "Polymer/polymer#^1.4.0",
"iron-elements": "PolymerElements/iron-elements#^1.0.10",
"iron-form": "PolymerElements/iron-form#^1.1.4",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"paper-elements": "PolymerElements/paper-elements#^1.0.7"
},
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
}
test001-app:
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/paper-input">
<dom-module id="test001-app">
<template>
<style>
:host {
display: block;
}
</style>
<h2>Hello [[prop1]]</h2>
<paper-input label="Etiqueta"></paper-input>
</template>
<script>
Polymer({
is: 'test001-app',
properties: {
prop1: {
type: String,
value: 'test001-app',
},
},
});
</script>
</dom-module>
控制台消息:
混合属性时未找到Polymer.IronA11yKeysBehavior行为 进纸输入! docs.js:126
混合时未找到Polymer.IronFormElementBehavior行为 属性成纸输入! docs.js:126
混合时未找到Polymer.IronFormElementBehavior行为 物业到纸 - 文本区! docs.js:126
混合属性时未找到Polymer.IronA11yKeysBehavior行为 到Polymer.PaperInputBehavior!
我尝试在打开和关闭纸质标签(即:abc)之间放置一些内容并显示,但不作为输入元素(就像基本文本一样)
答案 0 :(得分:1)
<paper-input>
的HTML导入不正确:
<!-- wrong -->
<link rel="import" href="../../bower_components/paper-input">
应该是:
<link rel="import" href="../../bower_components/paper-input/paper-input.html">