tr]:last:border-b-0",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
+ return (
+
+ )
+}
+
+function TableHead({ className, ...props }: React.ComponentProps<"th">) {
+ return (
+ [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableCell({ className, ...props }: React.ComponentProps<"td">) {
+ return (
+ | [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+function TableCaption({
+ className,
+ ...props
+}: React.ComponentProps<"caption">) {
+ return (
+
+ )
+}
+
+export {
+ Table,
+ TableHeader,
+ TableBody,
+ TableFooter,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableCaption,
+}
diff --git a/src/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx
new file mode 100644
index 0000000..a4e90d4
--- /dev/null
+++ b/src/components/ui/tooltip.tsx
@@ -0,0 +1,61 @@
+"use client"
+
+import * as React from "react"
+import * as TooltipPrimitive from "@radix-ui/react-tooltip"
+
+import { cn } from "@/lib/utils"
+
+function TooltipProvider({
+ delayDuration = 0,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function Tooltip({
+ ...props
+}: React.ComponentProps) {
+ return (
+
+
+
+ )
+}
+
+function TooltipTrigger({
+ ...props
+}: React.ComponentProps) {
+ return
+}
+
+function TooltipContent({
+ className,
+ sideOffset = 0,
+ children,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+
+ {children}
+
+
+
+ )
+}
+
+export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
diff --git a/src/hooks/data.ts b/src/hooks/data.ts
new file mode 100644
index 0000000..33b4f39
--- /dev/null
+++ b/src/hooks/data.ts
@@ -0,0 +1,5 @@
+import { useState } from "react"
+
+export function useStatus() {
+ return useState<"load" | "fail" | "done">("load")
+}
diff --git a/src/lib/api.ts b/src/lib/api.ts
index 7dd6fa9..0ff2667 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -30,9 +30,6 @@ type ExtraReq unknown> = T extends (
type ExtraResp unknown> =
Awaited> extends ApiResponse ? D : never
-// 预定义错误
-const UnauthorizedError = new Error("未授权访问")
-
export {
API_BASE_URL,
CLIENT_ID,
@@ -41,5 +38,4 @@ export {
type PageRecord,
type ExtraReq,
type ExtraResp,
- UnauthorizedError,
}
diff --git a/src/models/user.ts b/src/models/user.ts
new file mode 100644
index 0000000..11ce83d
--- /dev/null
+++ b/src/models/user.ts
@@ -0,0 +1,22 @@
+export type User = {
+ id: number
+ admin_id: number
+ phone: string
+ has_password: boolean
+ username: string
+ email: string
+ name: string
+ avatar: string
+ status: number
+ balance: number
+ id_type: number
+ id_no: string
+ id_token: string
+ contact_qq: string
+ contact_wechat: string
+ last_login: Date
+ last_login_host: string
+ last_login_agent: string
+ created_at: Date
+ updated_at: Date
+}
|