wxc-rate
自定义颜色
<wxc-rate value="4" color="#ff45a1" active-color="#ff45a1"></wxc-rate>
</template>
<script>
export default {
config: {
usingComponents: {
'wxc-rate': '@minui/wxc-rate'
},
data: { },
methods: { }
}
</script>
<style>
</style>
设置个数
基础用法
<template>
<wxc-rate bind:rate="onClick"></wxc-rate>
</template>
<script>
export default {
config: {
usingComponents: {
}
},
data: { },
/** note: 在 wxp 文件或者页面文件中请去掉 methods 包装 */
methods: {
onClick(e) {
console.log(e.detail.value);
}
}
}
</script>
<style>
</style>
只读
自定义大小
<template>
<wxc-rate value="4" size="28" padding="10" color="#ff45a1" active-color="#ff45a1"></wxc-rate>
</template>
<script>
export default {
config: {
usingComponents: {
'wxc-rate': '@minui/wxc-rate'
}
},
data: { },
methods: { }
}
</script>
<style>
</style>
设置默认值
Rate
v1.0.1(2018-6-5)
- 补充文档,增加
rate
点击事件说明
v1.0.0(2018-4-23)
- 初始版本