Select 聚合物dom repeat不适用于IE中的选择选项
嗨,我正在使用下面的代码创建一个聚合下拉元素。它在除IE之外的所有浏览器中都可以正常工作 水果-list.htmlSelect 聚合物dom repeat不适用于IE中的选择选项,select,polymer-1.0,Select,Polymer 1.0,嗨,我正在使用下面的代码创建一个聚合下拉元素。它在除IE之外的所有浏览器中都可以正常工作 水果-list.html <link href="https://rawgit.com/polymer/polymer/0.8-preview/polymer.html" rel="import"> <dom-module id="fruits-list"> <template> <select> <templa
<link href="https://rawgit.com/polymer/polymer/0.8-preview/polymer.html" rel="import">
<dom-module id="fruits-list">
<template>
<select>
<template is="dom-repeat" items="{{employees}}">
<option value="{{item.value}}">{{item.text}}</option>
</template>
</select>
</template>
<script>
Polymer({
is: 'fruits-list',
ready: function() {
this.employees = [
{value: 'one', text: 'apple'},
{value: 'two', text: 'banana'},
{value: 'three', text: 'orange'}
];
}
});
</script>
</dom-module>
{{item.text}
聚合物({
是‘水果清单’,
就绪:函数(){
这是我的雇员=[
{value:'one',text:'apple'},
{值:'two',文本:'banana'},
{值:“三”,文本:“橙色”}
];
}
});
index.html
<html>
<head>
<script src="https://rawgit.com/webcomponents/webcomponentsjs/master/webcomponents-lite.js"></script>
<link rel="import" href="x-example.html" />
</head>
<body>
<fruits-list></fruits-list>
</body>
</html>
IE中的所有元素(例如,select
和table
都不支持)都不支持dom repeat
(尽管在最新版本的Edge中支持)
另见: