Browse Source

fix(gui-v2): set color in style instead of safelisting

pull/2907/head
Wing-Kam Wong 2 years ago
parent
commit
c65a690d4e
  1. 10
      packages/nc-gui-v2/components/cell/Rating.vue

10
packages/nc-gui-v2/components/cell/Rating.vue

@ -36,13 +36,9 @@ const localState = computed({
<v-rating v-model="localState" :length="ratingMeta.max" dense x-small :readonly="readOnly" clearable> <v-rating v-model="localState" :length="ratingMeta.max" dense x-small :readonly="readOnly" clearable>
<!-- todo: use the proper slot --> <!-- todo: use the proper slot -->
<template #item="{ isFilled, click }"> <template #item="{ isFilled, click }">
<!-- todo : custom color and icon --> <!-- todo : custom icon -->
<!-- <v-icon v-if="isFilled"- :size="15" :color="ratingMeta.color" @click="click"> --> <MdiStarIcon v-if="isFilled" :style="`color: ${ratingMeta.color}`" @click="click" />
<MdiStarIcon v-if="isFilled" :class="`text-[${ratingMeta.color}]`" @click="click" /> <MdiStarOutlineIcon v-else :style="`color: ${ratingMeta.color}`" @click="click" />
<!-- </v-icon> -->
<!-- <v-icon v-else :color="ratingMeta.color" :size="15" class="nc-cell-hover-show" @click="click"> -->
<MdiStarOutlineIcon v-else :class="`text-[${ratingMeta.color}]`" @click="click" />
<!-- </v-icon> -->
</template> </template>
</v-rating> </v-rating>
</div> </div>

Loading…
Cancel
Save