diff --git a/src/components/common/VnColor.vue b/src/components/common/VnColor.vue index 8a5a787b0..614a6cd26 100644 --- a/src/components/common/VnColor.vue +++ b/src/components/common/VnColor.vue @@ -1,4 +1,6 @@ <script setup> +import { computed } from 'vue'; + const $props = defineProps({ colors: { type: String, @@ -6,7 +8,7 @@ const $props = defineProps({ }, }); -const colorArray = JSON.parse($props.colors)?.value; +const colorArray = computed(() => JSON.parse($props.colors)?.value); const maxHeight = 30; const colorHeight = maxHeight / colorArray?.length; </script> diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index 8173e3bb2..4db0b989e 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -47,7 +47,6 @@ const columns = computed(() => [ }, { labelAbbreviation: '', - label: 'Color', name: 'hex', columnSearch: false, isEditable: false, @@ -243,6 +242,7 @@ const dateStyle = (date) => :beforeSaveFn="(data, getChanges) => beforeSave(data, getChanges, 'FixedPrices')" > <template #column-hex="{ row }"> + <!-- {{ console.log('row: ', row?.hexJson, row?.warehouseName) }} --> <VnColor :colors="row?.hexJson" style="height: 100%; min-width: 2000px" /> </template> <template #column-name="{ row }">