refactor: refs #8363 update color when modifying an item
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
5eb6e7b24b
commit
d12cd60079
|
@ -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>
|
||||
|
|
|
@ -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 }">
|
||||
|
|
Loading…
Reference in New Issue