serv\web-侧边栏 标签统一

This commit is contained in:
2025-10-27 16:21:00 +08:00
parent e50de4a277
commit 5fa4e1cd42
47 changed files with 1933 additions and 1307 deletions

View File

@@ -48,7 +48,7 @@ import type { PageParam } from '@/types';
import defaultArticleImg from '@/assets/imgs/article-default.png';
interface Props {
categoryId?: string;
tagID?: string;
searchKeyword?: string;
}
@@ -70,7 +70,7 @@ onMounted(() => {
loadResources();
});
watch(() => [props.categoryId, props.searchKeyword], () => {
watch(() => [props.tagID, props.searchKeyword], () => {
currentPage.value = 1;
loadResources();
}, { deep: true });
@@ -82,14 +82,14 @@ async function loadResources() {
try {
const filter: ResourceSearchParams = {
categoryID: props.categoryId,
tagID: props.tagID,
keyword: props.searchKeyword,
// status: 1 // 只加载已发布的
};
const pageParam: PageParam = {
page: currentPage.value,
size: pageSize
pageNumber: currentPage.value,
pageSize: pageSize
};
const res = await resourceApi.getResourcePage(pageParam, filter);