mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-30 00:00:05 +08:00
feat: 接口增加泛型支持
This commit is contained in:
@@ -27,11 +27,11 @@ export const useDataListInit = () => {
|
||||
const res = await projectListApi({
|
||||
page: paginat.page,
|
||||
limit: paginat.limit
|
||||
}) as any
|
||||
if (res.data) {
|
||||
const { count } = res
|
||||
});
|
||||
if (res &&res.data) {
|
||||
const { count } = res as any; // 这里的count与data平级,不在Response结构中
|
||||
paginat.count = count
|
||||
list.value = res.data.map((e: any) => {
|
||||
list.value = res.data.map((e) => {
|
||||
const { id, projectName, state, createTime, indexImage, createUserId } = e
|
||||
return {
|
||||
id: id,
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
export type Chartype = {
|
||||
id: number | string
|
||||
title: string // 标题
|
||||
label: string // 标签
|
||||
label?: string // 标签
|
||||
time: string, // 时间
|
||||
image: string, // 预览图地址
|
||||
createId: string, // 创建者
|
||||
|
||||
Reference in New Issue
Block a user