perf: 开启列表图片懒加载并优化分页大小
This commit is contained in:
@ -185,6 +185,7 @@
|
|||||||
:preview-src-list="getImagesOnly(scope.row[col.prop]).map(u => getImageUrl(u))"
|
:preview-src-list="getImagesOnly(scope.row[col.prop]).map(u => getImageUrl(u))"
|
||||||
preview-teleported
|
preview-teleported
|
||||||
fit="cover"
|
fit="cover"
|
||||||
|
lazy
|
||||||
>
|
>
|
||||||
<template #error>
|
<template #error>
|
||||||
<div class="image-slot"><el-icon><Picture /></el-icon></div>
|
<div class="image-slot"><el-icon><Picture /></el-icon></div>
|
||||||
@ -768,7 +769,7 @@ const companyOptions = ref<string[]>([])
|
|||||||
|
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 100,
|
pageSize: 50,
|
||||||
keyword: '',
|
keyword: '',
|
||||||
sku: '',
|
sku: '',
|
||||||
category: '',
|
category: '',
|
||||||
|
|||||||
@ -184,6 +184,7 @@
|
|||||||
:preview-src-list="getImagesOnly(scope.row[col.prop]).map(u => getImageUrl(u))"
|
:preview-src-list="getImagesOnly(scope.row[col.prop]).map(u => getImageUrl(u))"
|
||||||
preview-teleported
|
preview-teleported
|
||||||
fit="cover"
|
fit="cover"
|
||||||
|
lazy
|
||||||
>
|
>
|
||||||
<template #error>
|
<template #error>
|
||||||
<div class="image-slot"><el-icon><Picture /></el-icon></div>
|
<div class="image-slot"><el-icon><Picture /></el-icon></div>
|
||||||
@ -580,7 +581,7 @@ const dialogStatus = ref<'create' | 'update'>('create')
|
|||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const queryParams = reactive({ page: 1, pageSize: 100, keyword: '', sku: '', category: '', material_type: '', statuses: ['在库', '借库'], company: '', orderByColumn: '', isAsc: '', advancedFilters: [] })
|
const queryParams = reactive({ page: 1, pageSize: 50, keyword: '', sku: '', category: '', material_type: '', statuses: ['在库', '借库'], company: '', orderByColumn: '', isAsc: '', advancedFilters: [] })
|
||||||
const categoryOptions = ref<string[]>([])
|
const categoryOptions = ref<string[]>([])
|
||||||
const typeOptions = ref<string[]>([])
|
const typeOptions = ref<string[]>([])
|
||||||
const companyOptions = ref<string[]>([]) // [新增]
|
const companyOptions = ref<string[]>([]) // [新增]
|
||||||
|
|||||||
@ -208,6 +208,7 @@
|
|||||||
:preview-src-list="getImagesOnly(scope.row[col.prop]).map(u => getImageUrl(u))"
|
:preview-src-list="getImagesOnly(scope.row[col.prop]).map(u => getImageUrl(u))"
|
||||||
preview-teleported
|
preview-teleported
|
||||||
fit="cover"
|
fit="cover"
|
||||||
|
lazy
|
||||||
>
|
>
|
||||||
<template #error>
|
<template #error>
|
||||||
<div class="image-slot"><el-icon><Picture /></el-icon></div>
|
<div class="image-slot"><el-icon><Picture /></el-icon></div>
|
||||||
@ -646,7 +647,7 @@ const dialogStatus = ref<'create' | 'update'>('create')
|
|||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const queryParams = reactive({ page: 1, pageSize: 100, keyword: '', sku: '', category: '', material_type: '', statuses: ['在库', '借库'], company: '', orderByColumn: '', isAsc: '', advancedFilters: [] })
|
const queryParams = reactive({ page: 1, pageSize: 50, keyword: '', sku: '', category: '', material_type: '', statuses: ['在库', '借库'], company: '', orderByColumn: '', isAsc: '', advancedFilters: [] })
|
||||||
const categoryOptions = ref<string[]>([])
|
const categoryOptions = ref<string[]>([])
|
||||||
const typeOptions = ref<string[]>([])
|
const typeOptions = ref<string[]>([])
|
||||||
const companyOptions = ref<string[]>([]) // [新增]
|
const companyOptions = ref<string[]>([]) // [新增]
|
||||||
|
|||||||
Reference in New Issue
Block a user