From e2a92db057ef2153f3e645e074f1e771987b2051 Mon Sep 17 00:00:00 2001 From: Gary Gu <garygu@Garydebijibendiannao.local> Date: Fri, 30 May 2025 10:35:53 +0800 Subject: [PATCH] feat: 优化数据 --- src/components/Gantt.vue | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/components/Gantt.vue b/src/components/Gantt.vue index 20a0a46..83990c9 100644 --- a/src/components/Gantt.vue +++ b/src/components/Gantt.vue @@ -30,6 +30,12 @@ export default { name: "Gantt", components: {}, + props: { + selectedId: { + type: String, + default: "", + }, + }, data() { return { taskslist: [], @@ -40,6 +46,16 @@ columnsShow: false, }; }, + watch: { + selectedId: { + handler(newVal) { + console.log("甘特图接收到的数据:", newVal); + // 处理数据变化的逻辑 + }, + deep: true, // 深度监听对象内部变化 + immediate: true, // 立即执行一次 + }, + }, mounted() { this.init(); //初始化 this.getProjectqryDataColl(); //获取数据 -- Gitblit v1.9.3