浏览代码

refactor(types): 使用常量映射重构订单状态类型定义

yz 2 周之前
父节点
当前提交
1b089bddd3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/api/types/order.d.ts

+ 1 - 1
src/api/types/order.d.ts

@@ -9,7 +9,7 @@ export type OrderType = 'PURCHASE' | 'SALES' | 'RETURN';
 /**
  * 订单状态枚举
  */
-export type OrderStatus = 0 | 1 | 2 | 3 | 4 | 5;
+export type OrderStatus = typeof ORDER_STATUS[keyof typeof ORDER_STATUS];
 
 /**
  * 订单查询参数接口