فهرست منبع

🐛 fix(order-detail): 修复订单详情类型定义错误

- 修正 orderClient 类型推断路径,从 `orderClient[':id'].$get` 改为 `orderClient[':id']['$get']`
- 确保类型定义与 API 客户端结构保持一致,避免类型错误
yourname 4 هفته پیش
والد
کامیت
27a0db12a9
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      mini/src/pages/order-detail/index.tsx

+ 1 - 1
mini/src/pages/order-detail/index.tsx

@@ -10,7 +10,7 @@ import dayjs from 'dayjs'
 import { InferResponseType } from 'hono'
 import './index.css'
 
-type OrderByIdResponse = InferResponseType<typeof orderClient[':id'].$get, 200>
+type OrderByIdResponse = InferResponseType<typeof orderClient[':id']['$get'], 200>
 type OrderListResponse = InferResponseType<typeof orderClient.$get, 200>
 type Order = (OrderByIdResponse | OrderListResponse['data'][0]) & {
   expireTime?: string | Date | null