Skip to content

Commit

Permalink
fix: 修复ts报错
Browse files Browse the repository at this point in the history
  • Loading branch information
JackySoft committed Nov 17, 2024
1 parent 18a668d commit af16f68
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/editor/src/api/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type ILibPublish = {
releaseHash: string;
};
// 获取组件列表
export const getLibList = (params: PageParams) => {
export const getLibList = (params: Omit<PageParams, 'projectId'> & { type: number }) => {
return request.get('/lib/list', params, { showLoading: false });
};

Expand Down
15 changes: 1 addition & 14 deletions packages/editor/src/api/page.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
import request from '@/utils/request';
import {
PageParams,
PageReqParams,
CreatePageParams,
PublishPageParams,
PublishListParams,
ProjectListParams,
ProjectCreateParams,
ProjectUpdateParams,
UserListParams,
UserCreateParams,
Menu,
Role,
} from './types';
import { PageParams } from './types';
export default {
getCategoryList(params: PageParams) {
return request.get('/page/category', params);
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/api/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface IWorkFlow {
}
export default {
// 获取模板列表
getTemplateList: (params: PageParams) => {
getTemplateList: (params: { pageNum: number; pageSize: number; keyword: string }) => {
return request.get('/workflow/list', params, { showLoading: false });
},
// 获取模板详情
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export default () => {
const [pageSize, setPageSize] = useState<number>(16);
const [hasMore, setHasMore] = useState<boolean>(true);
const [moreLoading, setMoreLoading] = useState<boolean>(false);

const navigate = useNavigate();
useEffect(() => {
setLoading(true);
Expand All @@ -38,7 +37,7 @@ export default () => {
const res = await getPageList({
pageNum: current || pageNum,
pageSize,
type: 1,
projectId: 0,
});
setPageNum(current);
setLoading(false);
Expand Down

0 comments on commit af16f68

Please sign in to comment.