Browse Source

refactor(forecast): 重命名canEditRow为canEdit并统一组件类型注释

yz 5 ngày trước cách đây
mục cha
commit
f029b49620
2 tập tin đã thay đổi với 6 bổ sung6 xóa
  1. 5 5
      src/views/forecast/forecastIndex.js
  2. 1 1
      src/views/forecast/types.d.ts

+ 5 - 5
src/views/forecast/forecastIndex.js

@@ -300,7 +300,7 @@ export default {
     },
     /**
      * 加载客户选项
-     * @this {Vue & {customerLoading: boolean, customerOptions: Array<CustomerOption>, $message: any}}
+     * @this {ForecastComponent & Vue}
      * @returns {Promise<void>}
      */
     async loadCustomerOptions() {
@@ -326,7 +326,7 @@ export default {
 
     /**
      * 远程搜索客户
-     * @this {Vue & {customerLoading: boolean, customerOptions: Array<CustomerOption>, loadCustomerOptions: () => Promise<void>}}
+     * @this {ForecastComponent & Vue}
      * @param {string} query - 搜索关键词
      * @returns {Promise<void>}
      */
@@ -363,7 +363,7 @@ export default {
 
     /**
      * 客户选择变化处理
-     * @this {Vue & ForecastComponent}
+     * @this {ForecastComponent & Vue}
      * @param {number} customerId - 客户ID
      * @returns {void}
      */
@@ -378,7 +378,7 @@ export default {
 
     /**
      * 加载物料选项
-     * @this {Vue & ForecastComponent}
+     * @this {ForecastComponent & Vue}
      * @returns {Promise<void>}
      */
     async loadItemOptions() {
@@ -405,7 +405,7 @@ export default {
 
     /**
      * 远程搜索物料
-     * @this {Vue & ForecastComponent}
+     * @this {ForecastComponent & Vue}
      * @param {string} query - 搜索关键词
      * @returns {Promise<void>}
      */

+ 1 - 1
src/views/forecast/types.d.ts

@@ -180,7 +180,7 @@ export interface ForecastComponent {
   /** 加载数据 */
   onLoad(page: any, params?: any): Promise<void>;
   /** 判断行是否可编辑 */
-  canEditRow(row: ForecastRecord): boolean;
+  canEdit(row: ForecastRecord): boolean;
   /** 返回列表 */
   handleBackToList(): void;
   /** 远程搜索物料 */