From 8c9217166d73b7019e899c2042cfb4fd91f4aa38 Mon Sep 17 00:00:00 2001 From: chiwenda <18150028757@163.com> Date: Sun, 12 Mar 2023 17:22:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=89=BE=E4=B8=8D=E5=88=B0=E5=9B=BE=E6=A0=87=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Icon/src/IconSelect.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/Icon/src/IconSelect.vue b/src/components/Icon/src/IconSelect.vue index 97a3e384..f5be8d3a 100644 --- a/src/components/Icon/src/IconSelect.vue +++ b/src/components/Icon/src/IconSelect.vue @@ -45,17 +45,22 @@ const tabsList = [ const pageList = computed(() => { if (currentPage.value === 1) { return copyIconList[currentActiveType.value] - .filter((v) => v.includes(filterValue.value)) + ?.filter((v) => v.includes(filterValue.value)) .slice(currentPage.value - 1, pageSize.value) } else { return copyIconList[currentActiveType.value] - .filter((v) => v.includes(filterValue.value)) + ?.filter((v) => v.includes(filterValue.value)) .slice( pageSize.value * (currentPage.value - 1), pageSize.value * (currentPage.value - 1) + pageSize.value ) } }) +const iconCount = computed(() => { + return copyIconList[currentActiveType.value] == undefined + ? 0 + : copyIconList[currentActiveType.value].length +}) const iconItemStyle = computed((): ParameterCSSProperties => { return (item) => { @@ -159,7 +164,7 @@ watch(