diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts index f0f5d7e9..cd420a29 100644 --- a/src/api/system/notice/index.ts +++ b/src/api/system/notice/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' export interface NoticeVO { - id: number + id: number | undefined title: string type: number content: string 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( + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index ab31b09b..ab375f88 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -1,150 +1,170 @@