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(