fix:修改菜单找不到图标时报错
This commit is contained in:
parent
1757515b14
commit
8c9217166d
@ -45,17 +45,22 @@ const tabsList = [
|
|||||||
const pageList = computed(() => {
|
const pageList = computed(() => {
|
||||||
if (currentPage.value === 1) {
|
if (currentPage.value === 1) {
|
||||||
return copyIconList[currentActiveType.value]
|
return copyIconList[currentActiveType.value]
|
||||||
.filter((v) => v.includes(filterValue.value))
|
?.filter((v) => v.includes(filterValue.value))
|
||||||
.slice(currentPage.value - 1, pageSize.value)
|
.slice(currentPage.value - 1, pageSize.value)
|
||||||
} else {
|
} else {
|
||||||
return copyIconList[currentActiveType.value]
|
return copyIconList[currentActiveType.value]
|
||||||
.filter((v) => v.includes(filterValue.value))
|
?.filter((v) => v.includes(filterValue.value))
|
||||||
.slice(
|
.slice(
|
||||||
pageSize.value * (currentPage.value - 1),
|
pageSize.value * (currentPage.value - 1),
|
||||||
pageSize.value * (currentPage.value - 1) + pageSize.value
|
pageSize.value * (currentPage.value - 1) + pageSize.value
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const iconCount = computed(() => {
|
||||||
|
return copyIconList[currentActiveType.value] == undefined
|
||||||
|
? 0
|
||||||
|
: copyIconList[currentActiveType.value].length
|
||||||
|
})
|
||||||
|
|
||||||
const iconItemStyle = computed((): ParameterCSSProperties => {
|
const iconItemStyle = computed((): ParameterCSSProperties => {
|
||||||
return (item) => {
|
return (item) => {
|
||||||
@ -159,7 +164,7 @@ watch(
|
|||||||
|
|
||||||
<ElPagination
|
<ElPagination
|
||||||
small
|
small
|
||||||
:total="copyIconList[currentActiveType].length as unknown as number"
|
:total="iconCount"
|
||||||
:page-size="pageSize"
|
:page-size="pageSize"
|
||||||
:current-page="currentPage"
|
:current-page="currentPage"
|
||||||
background
|
background
|
||||||
|
Loading…
Reference in New Issue
Block a user