0
0
Fork 0

fix: columns style

This commit is contained in:
Alex Moreno 2024-07-16 14:03:14 +02:00
parent bfa61d9bea
commit 3cd185360b
6 changed files with 24 additions and 32 deletions

View File

@ -351,7 +351,7 @@ defineExpose({
/> />
</template> </template>
<template #header-cell="{ col }"> <template #header-cell="{ col }">
<QTh v-if="col.visible ?? true" auto-width> <QTh v-if="col.visible ?? true" :class="[col.columnClass]">
<div <div
class="column self-start q-ml-xs ellipsis" class="column self-start q-ml-xs ellipsis"
:class="`text-${col?.align ?? 'left'}`" :class="`text-${col?.align ?? 'left'}`"
@ -376,6 +376,7 @@ defineExpose({
:data-key="$attrs['data-key']" :data-key="$attrs['data-key']"
v-model="params[columnName(col)]" v-model="params[columnName(col)]"
:search-url="searchUrl" :search-url="searchUrl"
class="full-width"
/> />
</div> </div>
</QTh> </QTh>
@ -400,7 +401,7 @@ defineExpose({
<QTd <QTd
auto-width auto-width
class="no-margin q-px-xs" class="no-margin q-px-xs"
:class="[getColAlign(col), col.class, col.columnField?.class]" :class="[getColAlign(col), col.columnClass]"
v-if="col.visible ?? true" v-if="col.visible ?? true"
> >
<slot :name="`column-${col.name}`" :col="col" :row="row"> <slot :name="`column-${col.name}`" :col="col" :row="row">

View File

@ -233,27 +233,23 @@ input::-webkit-inner-spin-button {
} }
.q-table { .q-table {
thead, th,
tbody { td {
th { padding: 1px 10px 1px 10px;
.q-select { max-width: 100px;
max-width: 120px; div span {
}
}
td {
padding: 1px 10px 1px 10px;
max-width: 100px;
div span {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.expand { overflow: hidden;
max-width: 400px; white-space: nowrap;
} text-overflow: ellipsis;
}
.shrink {
max-width: 75px;
}
.expand {
max-width: 400px;
} }
} }

View File

@ -44,7 +44,7 @@ const columns = computed(() => [
fields: ['id', 'name'], fields: ['id', 'name'],
}, },
}, },
class: 'expand', columnClass: 'expand',
}, },
{ {
align: 'left', align: 'left',

View File

@ -42,9 +42,7 @@ const columns = computed(() => [
name: 'name', name: 'name',
isTitle: true, isTitle: true,
create: true, create: true,
columnField: { columnClass: 'expand',
class: 'expand',
},
}, },
{ {
align: 'left', align: 'left',
@ -52,9 +50,7 @@ const columns = computed(() => [
label: t('customer.extendedList.tableVisibleColumns.socialName'), label: t('customer.extendedList.tableVisibleColumns.socialName'),
isTitle: true, isTitle: true,
create: true, create: true,
columnField: { columnClass: 'expand',
class: 'expand',
},
}, },
{ {
align: 'left', align: 'left',
@ -136,9 +132,7 @@ const columns = computed(() => [
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
columnField: { columnClass: 'expand',
class: 'expand',
},
}, },
{ {
align: 'left', align: 'left',

View File

@ -32,7 +32,7 @@ const columns = computed(() => [
optionLabel: 'socialName', optionLabel: 'socialName',
}, },
}, },
class: 'expand', columnClass: 'expand',
}, },
{ {
align: 'left', align: 'left',

View File

@ -45,6 +45,7 @@ const columns = computed(() => [
inWhere: true, inWhere: true,
alias: 't', alias: 't',
}, },
columnClass: 'shrink',
}, },
{ {
align: 'left', align: 'left',
@ -57,7 +58,7 @@ const columns = computed(() => [
fields: ['id', 'name'], fields: ['id', 'name'],
}, },
}, },
class: 'expand', columnClass: 'expand',
}, },
{ {
name: 'isConfirmed', name: 'isConfirmed',