diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts index f0f5d7e9c7e2a7e17e60f71dcda8c955ecdb1f5b..cd420a29acad7d2334f227840a5dde1c9241ef5e 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 97a3e384c6b89e2e45d5a7ddc9a513a049d3565c..f5be8d3a820ae6c81864124e851dc4d88c2ee68e 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 ab31b09bf2218aaebc2ffcee07475e7f182568c5..ab375f88b9610f4a52d63a039b89050904fc9b52 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -1,150 +1,170 @@