0
我已经包含另一聚合物组分内像这样的聚合物组分添加聚合物组件属性动态
<dom-module id="custom-component2">
<template>
<custom-component1 id="component1" type="abc" config="xyz"></custom-component1>
</template>
</dom-module>
<script>
Polymer({
is: 'custom-component2',
properties: {
},
ready: function() {
},
init: function() {
}
});
</script>
反正我有可以添加的属性,如类型,配置为我的“定制COMPONENT1”动态喜欢 -
<dom-module id="custom-component2">
<template>
<custom-component1 id="component1"></custom-component1>
</template>
</dom-module>
<script>
Polymer({
is: 'custom-component2',
properties: {
},
ready: function() {
self.$.component1.type = "abc";
self.$.component1.config = "xyz";
}
});
</script>
或者我可以将这些选项作为一个整体作为对象传递吗?
请问有人可以帮我吗?