fix(@vben/web-antd): 修复甘特图组件 props 丢失导致运行时崩溃
linter 在 pre-commit 过程中移除了 defineProps/defineEmits, 导致 props 变量未定义,computed 计算 autoRange 等时抛出 ReferenceError: props is not defined Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user