perf: replace ItemPicture in favour of VnImg
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-06-25 12:39:21 +02:00
parent 0c42bba779
commit 1eaa0c9ce2
2 changed files with 7 additions and 8 deletions

View File

@ -17,7 +17,7 @@ const $props = defineProps({
},
zoomSize: {
type: String,
required: true,
required: false,
default: 'lg',
},
id: {
@ -57,6 +57,7 @@ onMounted(() => {});
<style lang="scss" scoped>
.q-img {
cursor: zoom-in;
min-width: 50px;
}
.rounded {
border-radius: 50%;

View File

@ -9,14 +9,14 @@ import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import TicketEditManaProxy from './TicketEditMana.vue';
import ItemPicture from 'src/components/ui/ItemPicture.vue';
import VnImg from 'src/components/ui/VnImg.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import TicketSaleMoreActions from './TicketSaleMoreActions.vue';
import TicketTransfer from './TicketTransfer.vue';
import { useStateStore } from 'stores/useStateStore';
import { useSession } from 'composables/useSession';
import { toCurrency, toPercentage, dashIfEmpty } from 'src/filters';
import { useArrayData } from 'composables/useArrayData';
import { useVnConfirm } from 'composables/useVnConfirm';
@ -25,8 +25,6 @@ import axios from 'axios';
const route = useRoute();
const router = useRouter();
const { getTokenMultimedia } = useSession();
const token = getTokenMultimedia();
const stateStore = useStateStore();
const { t } = useI18n();
const { notify } = useNotify();
@ -607,9 +605,9 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</template>
<template #body-cell-picture="{ row }">
<QTd>
<ItemPicture
:url="`/api/Images/catalog/50x50/${row.itemFk}/download?access_token=${token}`"
/>
<div class="image-wrapper">
<VnImg :id="row.itemFk" class="rounded" />
</div>
</QTd>
</template>
<template #body-cell-visible="{ row }">