# Score 评分
# 基础用法
<template>
<view>
<unify-score @click="selectNum"></unify-score>
</view>
</template>
<script>
export default {
data() {
return {
};
},
methods: {
selectNum: function(e) {
console.log("选中数量:"+e);
}
}
}
</script>
# 字体图标
icon-name
参数为:['iconfavorfill', 'iconfavor'],下标0为激活的图标,下标1为未激活图标
icon-color
参数为:['color-red', 'color-gray'],下标0为激活的图标颜色,下标1为未激活图标颜色
<unify-score :icon-name="['iconlikefill', 'iconlike']"></unify-score>
# Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
disabled | 控制是否禁止点击 | Boolean | true/false | false |
number | 数量 | String/Number | - | 5 |
value | 初始数量 | String/Number | - | 0 |
icon-name | 字体图标 | Array | - | ['iconfavorfill', 'iconfavor'] |
icon-size | 图标尺寸 | String/Number | - | 32 |
icon-color | 图标颜色 | Array | - | ['color-red', 'color-gray'] |
# Event
事件名 | 说明 | 回调参数 |
---|---|---|
@click | 点击事件 | 选中数量 |