fix: disable quotation tab
This commit is contained in:
parent
6ea3f53c68
commit
6dbff63d01
1 changed files with 37 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { QTableProps } from 'quasar';
|
import { QTableProps } from 'quasar';
|
||||||
import KebabAction from 'components/shared/KebabAction.vue';
|
import KebabAction from 'components/shared/KebabAction.vue';
|
||||||
|
import DeleteButton from './button/DeleteButton.vue';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|
@ -11,6 +12,10 @@ const props = withDefaults(
|
||||||
grid?: boolean;
|
grid?: boolean;
|
||||||
hideHeader?: boolean;
|
hideHeader?: boolean;
|
||||||
buttomDownload?: boolean;
|
buttomDownload?: boolean;
|
||||||
|
buttonDelete?: boolean;
|
||||||
|
hidePagination?: boolean;
|
||||||
|
|
||||||
|
imgColumn?: string;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
row: () => [],
|
row: () => [],
|
||||||
|
|
@ -20,6 +25,7 @@ const props = withDefaults(
|
||||||
grid: false,
|
grid: false,
|
||||||
hideHeader: false,
|
hideHeader: false,
|
||||||
buttomDownload: false,
|
buttomDownload: false,
|
||||||
|
imgColumn: '',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -33,10 +39,17 @@ defineEmits<{
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-table v-bind="props" class="full-height">
|
<q-table
|
||||||
|
v-bind="props"
|
||||||
|
class="full-height"
|
||||||
|
:no-data-label="$t('general.noDataTable')"
|
||||||
|
:hide-pagination
|
||||||
|
>
|
||||||
|
<slot name="zxc"></slot>
|
||||||
|
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr
|
<q-tr
|
||||||
:style="`background-color:hsla(var(--info-bg) / 0.07) `"
|
style="background-color: hsla(var(--info-bg) / 0.07)"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
@ -51,9 +64,25 @@ defineEmits<{
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:body-cell-order="props">
|
||||||
|
<q-td class="text-center">
|
||||||
|
{{ props.rowIndex + 1 }}
|
||||||
|
</q-td>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:[`body-cell-${imgColumn}`]="props">
|
||||||
|
<q-td>
|
||||||
|
<slot name="img-column" :props="props"></slot>
|
||||||
|
{{ props.row[imgColumn] }}
|
||||||
|
</q-td>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-slot:body-cell-action="props">
|
<template v-slot:body-cell-action="props">
|
||||||
<q-td class="text-center">
|
<q-td class="text-center">
|
||||||
|
<DeleteButton iconOnly v-if="buttonDelete" />
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="!buttonDelete"
|
||||||
icon="mdi-eye-outline"
|
icon="mdi-eye-outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
dense
|
dense
|
||||||
|
|
@ -73,6 +102,7 @@ defineEmits<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<KebabAction
|
<KebabAction
|
||||||
|
v-if="!buttonDelete"
|
||||||
hide-toggle
|
hide-toggle
|
||||||
:id-name="props.row.code"
|
:id-name="props.row.code"
|
||||||
:status="props.row.status"
|
:status="props.row.status"
|
||||||
|
|
@ -88,4 +118,8 @@ defineEmits<{
|
||||||
</q-table>
|
</q-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
:deep(i.q-icon.mdi.mdi-alert.q-table__bottom-nodata-icon) {
|
||||||
|
color: #ffc224 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue