From 93498273eb167663d4b6f5d478d5200f5ffc2fc3 Mon Sep 17 00:00:00 2001 From: lzh Date: Tue, 7 Apr 2026 13:06:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(@vben/web-antd):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E7=BB=84=E4=BB=B6=20props=20?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E5=AF=BC=E8=87=B4=E8=BF=90=E8=A1=8C=E6=97=B6?= =?UTF-8?q?=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit linter 在 pre-commit 过程中移除了 defineProps/defineEmits, 导致 props 变量未定义,computed 计算 autoRange 等时抛出 ReferenceError: props is not defined Co-Authored-By: Claude Opus 4.6 (1M context) --- .../ops/trajectory/modules/trajectory-gantt-area.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/web-antd/src/views/ops/trajectory/modules/trajectory-gantt-area.vue b/apps/web-antd/src/views/ops/trajectory/modules/trajectory-gantt-area.vue index d9b5a567b..1b2688936 100644 --- a/apps/web-antd/src/views/ops/trajectory/modules/trajectory-gantt-area.vue +++ b/apps/web-antd/src/views/ops/trajectory/modules/trajectory-gantt-area.vue @@ -12,6 +12,16 @@ import { ensureAreaTree, } from './area-tree-cache'; +const props = defineProps<{ + date: string; + loading?: boolean; + records: OpsTrajectoryApi.TrajectoryRecord[]; +}>(); + +const emit = defineEmits<{ + (e: 'select', record: OpsTrajectoryApi.TrajectoryRecord): void; +}>(); + // 使用模块级缓存的区域树 const areaTree = cachedAreaTree; const treeLoaded = areaTreeLoaded;