2020-10-21

element rate评分组建使用

评分组件在el-table展示时的使用

大于0分时展示,为0时显示无评分

     <el-table-column label="评分" prop="score" width="180">     <template slot-scope="{row}">      <el-rate v-if="row.score > 0"      v-model="row.score"      disabled      show-score      text-color="#101010"      score-template="{ value }分"      :colors="scoreColors"      >      </el-rate>      <el-rate v-else      v-model="row.score"      disabled      show-score      text-color="#101010"      score-template="无评分"      :colors="scoreColors"      >      </el-rate>     </template>     </el-table-column>// data中的scoreColors 颜色对应评分12 3 45scoreColors: ['#99A9BF', '#F7BA2A', '#FF9900'], // 等同于 { 2: '#99A9BF', 4: { value: '#F7BA2A', excluded: true }

  

 

参考:

官网:https://element.eleme.cn/#/zh-CN/component/rate#rate-ping-fen

element rate源码:https://www.cnblogs.com/wsk1576025821/p/10979326.html

 

原文转载:http://www.shaoqun.com/a/481410.html

海拍客:https://www.ikjzd.com/w/1742

捷汇:https://www.ikjzd.com/w/419

extra:https://www.ikjzd.com/w/1736


评分组件在el-table展示时的使用大于0分时展示,为0时显示无评分<el-table-columnlabel="评分"prop="score"width="180"><templateslot-scope="{row}"><el-ratev-if="row.score>
ad公司:https://www.ikjzd.com/w/1332
文化衫事件:https://www.ikjzd.com/w/1932
南昆山川龙峡漂流多长时间?川龙峡漂流玩几个小时?:http://tour.shaoqun.com/a/57768.html
2018美国假日季电商预测报告:销售额大增14.8%达1240亿美元!:https://www.ikjzd.com/home/10287
松原市中心广场旅游:http://tour.shaoqun.com/a/37328.html

No comments:

Post a Comment