聚合物纸下拉菜单
Polymer paper-dropdown-menu
我正在尝试 paper-dropdown-menu
。它似乎在 Google Chrome 上工作,但在 Firefox 上,下拉菜单没有出现。这仅与 Chrome 浏览器兼容吗?
<link rel="import" href="../../bower_components/polymer/polymer.html">
<dom-module id="cc-dropdown">
<template>
{{selectedData}}
<paper-dropdown-menu label="Environment">
<paper-menu class="dropdown-content" attr-for-selected="value" selected="{{selectedData}}">
<template is="dom-repeat" items="{{data}}">
<paper-item value="{{item}}">{{item}}</paper-item>
</template>
</paper-menu>
</paper-dropdown-menu>
</template>
<script>
(function() {
'use strict';
Polymer({
is: 'cc-dropdown',
properties: {
data: {
type: Array,
value: ["Stage", "Prod"],
notify: true
},
selectedData: {
type: String,
value: "Stage",
notify: true
}
}
});
})();
</script>
</dom-module>
这是适合我的
我正在尝试 paper-dropdown-menu
。它似乎在 Google Chrome 上工作,但在 Firefox 上,下拉菜单没有出现。这仅与 Chrome 浏览器兼容吗?
<link rel="import" href="../../bower_components/polymer/polymer.html">
<dom-module id="cc-dropdown">
<template>
{{selectedData}}
<paper-dropdown-menu label="Environment">
<paper-menu class="dropdown-content" attr-for-selected="value" selected="{{selectedData}}">
<template is="dom-repeat" items="{{data}}">
<paper-item value="{{item}}">{{item}}</paper-item>
</template>
</paper-menu>
</paper-dropdown-menu>
</template>
<script>
(function() {
'use strict';
Polymer({
is: 'cc-dropdown',
properties: {
data: {
type: Array,
value: ["Stage", "Prod"],
notify: true
},
selectedData: {
type: String,
value: "Stage",
notify: true
}
}
});
})();
</script>
</dom-module>
这是适合我的