Skip to content
官方QQ交流群
pc端ui:468705115   点此加入
移动端ui:468217742   点此加入
技术交流1:87208295   点此加入
技术交流2:787747122   点此加入
官网
云控制台
开放平台
关注微信公众号
代码仓库: 码云

cv-rate 评分

简要

多用于商品评价打分、服务态度评价、用户满意度等场景,组件名:cv-rate

示例

vue
<template>
  <view class="content">
    <view class="components-title">
      <view class="components-title-t">cv-rate</view>
      <view class="components-title-d">评分</view>
    </view>
    <cv-form-base ref="refFormBase" labelWidth="100" style="padding: 0 10px">
      <cv-form-item label="默认">
        <cv-rate v-model="formData.rate1" />
      </cv-form-item>
      <cv-form-item label="label">
        <cv-rate />
      </cv-form-item>
      <cv-form-item label="自定义长度">
        <cv-rate max="10" />
      </cv-form-item>
      <cv-form-item label="自定义大小">
        <cv-rate size="30" />
      </cv-form-item>
      <cv-form-item label="自定义颜色">
        <cv-rate activeColor="#ff0000" />
      </cv-form-item>
      <cv-form-item label="自定义间距">
        <cv-rate margin="5" />
      </cv-form-item>
      <cv-form-item label="禁止点击">
        <cv-rate disabled />
      </cv-form-item>
      <cv-form-item label="未选中的星星为镂空状态">
        <cv-rate isFill />
      </cv-form-item>
    </cv-form-base>
  </view>
</template>

<script>
export default {
  data() {
    return {
      formData: {
        rate1: 3
      },
      info1: ''
    };
  },
  watch: {
    formData() {
      console.log('---');
    }
  },
  onLoad() {},
  methods: {}
};
</script>

属性

属性名类型默认值说明
v-modelNumber1当前评分
isFillBooleanfalse星星的类型,是否镂空
colorString#ececec星星的颜色
activeColorString#ffca3e星星选中状态颜色
sizeNumber24星星的大小
maxNumber5最大评分
marginNumber0星星的间距
disabledBooleanfalse是否可点击

Copyright © 2017 10yun.com | 十云提供计算服务-IPV6 | ctocode组开发