wip: Table component developing
This commit is contained in:
11
src/api/table/index.ts
Normal file
11
src/api/table/index.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import type { TableData } from './types'
|
||||
|
||||
const { request } = useAxios()
|
||||
|
||||
export const getTableListApi = ({ params }: AxiosConfig) => {
|
||||
return request<{
|
||||
total: number
|
||||
list: TableData[]
|
||||
}>({ url: '/example/list', method: 'get', params })
|
||||
}
|
||||
9
src/api/table/types.ts
Normal file
9
src/api/table/types.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export type TableData = {
|
||||
id: string
|
||||
author: string
|
||||
title: string
|
||||
content: string
|
||||
importance: number
|
||||
display_time: string
|
||||
pageviews: number
|
||||
}
|
||||
Reference in New Issue
Block a user