serv\web-侧边栏 标签统一
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user