فهرست منبع

refactor(订单表单): 将类型导入从constants迁移到types并更新类型注释

yz 1 هفته پیش
والد
کامیت
a02a3cb61d
1فایلهای تغییر یافته به همراه8 افزوده شده و 13 حذف شده
  1. 8 13
      src/components/order-form/order-form-mixin.js

+ 8 - 13
src/components/order-form/order-form-mixin.js

@@ -42,37 +42,32 @@ import {
  */
 
 /**
- * @typedef {import('./constants').MaterialDetailRecord} MaterialDetailRecord
+ * @typedef {import('./types').MaterialDetailRecord} MaterialDetailRecord
  * @description 物料明细记录类型
  */
 
 /**
- * @typedef {import('./constants').OrderFormModel} OrderFormModel
+ * @typedef {import('./types').OrderFormModel} OrderFormModel
  * @description 订单表单数据模型类型
  */
 
 /**
- * @typedef {import('./constants').MaterialDeleteEventData} MaterialDeleteEventData
+ * @typedef {import('./types').MaterialDeleteEventData} MaterialDeleteEventData
  * @description 物料删除事件数据类型
  */
 
 /**
- * @typedef {import('./constants').ApiResponse} ApiResponse
+ * @typedef {import('./types').ApiResponse} ApiResponse
  * @description API响应数据类型
  */
 
 /**
- * @typedef {import('./constants').PaginatedResponse} PaginatedResponse
- * @description 分页响应数据类型
- */
-
-/**
- * @typedef {import('./constants').ValidationRule} ValidationRule
+ * @typedef {import('./types').ValidationRule} ValidationRule
  * @description 表单验证规则类型
  */
 
 /**
- * @typedef {import('./constants').OrderFormMixinData} OrderFormMixinData
+ * @typedef {import('./types').OrderFormMixinData} OrderFormMixinData
  * @description 订单表单混入数据类型
  */
 
@@ -126,14 +121,14 @@ export default {
       /**
        * 订单类型选项列表
        * @description 订单类型下拉选择器的选项数据
-       * @type {OrderTypeOption[]}
+       * @type {typeof ORDER_TYPE_OPTIONS}
        */
       orderTypeOptions: ORDER_TYPE_OPTIONS,
 
       /**
        * 订单状态选项列表
        * @description 订单状态下拉选择器的选项数据
-       * @type {OrderStatusOption[]}
+       * @type {typeof ORDER_STATUS_OPTIONS}
        */
       orderStatusOptions: ORDER_STATUS_OPTIONS
     }