refactor: refs #6897 update component attributes and improve checkbox integration in tables
This commit is contained in:
parent
f4e210734b
commit
45f4a1cea8
|
@ -712,14 +712,14 @@ const checkbox = ref(null);
|
||||||
"
|
"
|
||||||
style="color: var(--vn-text-color)"
|
style="color: var(--vn-text-color)"
|
||||||
:class="hasEditableFormat(col)"
|
:class="hasEditableFormat(col)"
|
||||||
size="17px"
|
size="14px"
|
||||||
/>
|
/>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-else-if="col?.component === 'checkbox'"
|
v-else-if="col?.component === 'checkbox'"
|
||||||
:name="getCheckboxIcon(row[col?.name])"
|
:name="getCheckboxIcon(row[col?.name])"
|
||||||
style="color: var(--vn-text-color)"
|
style="color: var(--vn-text-color)"
|
||||||
:class="hasEditableFormat(col)"
|
:class="hasEditableFormat(col)"
|
||||||
size="17px"
|
size="14px"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
v-else
|
v-else
|
||||||
|
@ -878,9 +878,12 @@ const checkbox = ref(null);
|
||||||
<QTh
|
<QTh
|
||||||
v-for="col of cols.filter((cols) => cols.visible ?? true)"
|
v-for="col of cols.filter((cols) => cols.visible ?? true)"
|
||||||
:key="col?.id"
|
:key="col?.id"
|
||||||
class="text-center"
|
:class="getColAlign(col)"
|
||||||
>
|
>
|
||||||
<slot :name="`column-footer-${col.name}`" />
|
<slot
|
||||||
|
:name="`column-footer-${col.name}`"
|
||||||
|
:isEditableColumn="isEditableColumn(col)"
|
||||||
|
/>
|
||||||
</QTh>
|
</QTh>
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
|
@ -994,8 +997,8 @@ es:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.side-padding {
|
.side-padding {
|
||||||
padding-left: 10px;
|
padding-left: 1px;
|
||||||
padding-right: 10px;
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
.editable-text:hover {
|
.editable-text:hover {
|
||||||
border-bottom: 1px dashed var(--q-primary);
|
border-bottom: 1px dashed var(--q-primary);
|
||||||
|
|
|
@ -45,7 +45,6 @@ function toValueAttrs(attrs) {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<slot name="test" />
|
|
||||||
<span
|
<span
|
||||||
v-for="toComponent of componentArray"
|
v-for="toComponent of componentArray"
|
||||||
:key="toComponent.name"
|
:key="toComponent.name"
|
||||||
|
|
|
@ -264,6 +264,7 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'isActive',
|
name: 'isActive',
|
||||||
label: t('customer.summary.isActive'),
|
label: t('customer.summary.isActive'),
|
||||||
|
component: 'checkbox',
|
||||||
chip: {
|
chip: {
|
||||||
color: null,
|
color: null,
|
||||||
condition: (value) => !value,
|
condition: (value) => !value,
|
||||||
|
@ -302,6 +303,7 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'isFreezed',
|
name: 'isFreezed',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
|
label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
|
||||||
|
component: 'checkbox',
|
||||||
chip: {
|
chip: {
|
||||||
color: null,
|
color: null,
|
||||||
condition: (value) => value,
|
condition: (value) => value,
|
||||||
|
|
|
@ -98,7 +98,7 @@ const columns = [
|
||||||
align: 'center',
|
align: 'center',
|
||||||
label: 'Id',
|
label: 'Id',
|
||||||
name: 'itemFk',
|
name: 'itemFk',
|
||||||
component: 'input',
|
component: 'number',
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
width: '40px',
|
width: '40px',
|
||||||
},
|
},
|
||||||
|
@ -142,6 +142,7 @@ const columns = [
|
||||||
labelAbbreviation: t('Siz.'),
|
labelAbbreviation: t('Siz.'),
|
||||||
label: t('Size'),
|
label: t('Size'),
|
||||||
toolTip: t('Size'),
|
toolTip: t('Size'),
|
||||||
|
component: 'number',
|
||||||
name: 'size',
|
name: 'size',
|
||||||
width: '35px',
|
width: '35px',
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
|
@ -655,7 +656,7 @@ onMounted(() => {
|
||||||
<FetchedTags :item="row" :columns="3" />
|
<FetchedTags :item="row" :columns="3" />
|
||||||
</template>
|
</template>
|
||||||
<template #column-stickers="{ row }">
|
<template #column-stickers="{ row }">
|
||||||
<span :class="editableMode ? 'editable-text' : ''">
|
<span class="editable-text">
|
||||||
<span style="color: var(--vn-label-color)">
|
<span style="color: var(--vn-label-color)">
|
||||||
{{ row.printedStickers }}
|
{{ row.printedStickers }}
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue