我试图扩展paper-fab
元素,但之后我失去了连锁反应。
我的代码如下所示:
<polymer-element name="custom-fab" attributes="name count" extends="paper-fab">
<template>
<style>
:host{
margin: 5px;
};
</style>
<shadow></shadow>
</template>
<script>
Polymer({
count: 0,
created: function() {
this.name = {};
}
})
</script>
</polymer-element>
答案 0 :(得分:1)
那是因为我的元素为空,我在向ripple
属性添加一些文字后再次获得label
效果。
<custom-fab label="test"></custom-fab>