feat(project): init
This commit is contained in:
8
components/tree-select/api/index.ts
Normal file
8
components/tree-select/api/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import httpFetch from "@/api/fetch"
|
||||
import { TreeNode } from "./type"
|
||||
|
||||
export const getCityTree = () =>
|
||||
httpFetch<Array<TreeNode>>({
|
||||
url: `https://backend.shay7sev.site/api/v1/backend/city`,
|
||||
method: "GET",
|
||||
})
|
||||
5
components/tree-select/api/type.ts
Normal file
5
components/tree-select/api/type.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type TreeNode = {
|
||||
value: string
|
||||
label: string
|
||||
children?: TreeNode[]
|
||||
}
|
||||
Reference in New Issue
Block a user