@@ -17,6 +17,7 @@ import img from "../img";
1717import mainConfig from " ../default_configs.json" ;
1818import { useNestedProp } from " ../useNestedProp" ;
1919import UserOptions from " ../atoms/UserOptions.vue" ;
20+ import Shape from " ../atoms/Shape.vue" ;
2021
2122const props = defineProps ({
2223 config: {
@@ -239,8 +240,23 @@ defineExpose({
239240 v-for =" (cell, j) in row.displayValues"
240241 :data-cell =" tableConfig.table.head.values[j]"
241242 >
242- <slot v-if =" j === 0" name =" rowTitle" v-bind =" { value: cell, rowIndex: i, colIndex: j, type: typeof cell, isResponsive}" ></slot >
243- <slot v-if =" j > 0" name =" cell" v-bind =" { value: cell, rowIndex: i, colIndex: j, type: typeof cell, isResponsive, color: row.colors[j], textColor: adaptColorToBackground(row.colors[j]) }" ></slot >
243+ <template v-if =" row .color && j === 0 " >
244+ <div style =" display :flex ; flex-direction : row ; gap :2px ; align-items :center ;" >
245+ <svg :height =" tableConfig.style.shapeSize" :width =" tableConfig.style.shapeSize" v-if =" row.color" viewBox =" 0 0 20 20" style =" background : none ;overflow : visible " >
246+ <Shape
247+ :plot =" { x: 10, y: 10 }"
248+ :color =" row.color"
249+ :radius =" 9"
250+ :shape =" row.shape || 'circle'"
251+ />
252+ </svg >
253+ <slot name =" rowTitle" v-bind =" { value: cell, rowIndex: i, colIndex: j, type: typeof cell, isResponsive}" ></slot >
254+ </div >
255+ </template >
256+ <template v-else >
257+ <slot v-if =" j === 0" name =" rowTitle" v-bind =" { value: cell, rowIndex: i, colIndex: j, type: typeof cell, isResponsive}" ></slot >
258+ <slot v-if =" j > 0" name =" cell" v-bind =" { value: cell, rowIndex: i, colIndex: j, type: typeof cell, isResponsive, color: row.colors[j], textColor: adaptColorToBackground(row.colors[j]) }" ></slot >
259+ </template >
244260 </td >
245261 <td role =" cell" data-cell =" sum" v-if =" tableConfig.table.showSum" >
246262 <slot name =" sum" v-bind =" { value: row.sum, rowIndex: i, isResponsive }" ></slot >
0 commit comments