From db66b7b2157aed66d2b1f8ebee8f212bd553e7ed Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 28 Oct 2026 14:26:19 +0000 Subject: [PATCH] =?UTF-8?q?perf(project):=20=E7=9C=8B=E6=9D=BF=E5=88=97?= =?UTF-8?q?=E5=A4=B4=E8=8F=9C=E5=8D=95=E6=94=B9=E4=B8=BA=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E5=B1=95=E5=BC=80=E6=97=B6=E6=89=8D=E6=B8=B2=E6=9F=93=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 每列菜单原先预先挂载约 17 个菜单项,18 列的项目约占面板一半的 watcher。改为记录已展开过的列,首次展开时再渲染。 移动端 4 倍降速实测,18 列项目打开时长任务约减半(1357 → 694ms)。 --- .../js/pages/manage/components/ProjectPanel.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/pages/manage/components/ProjectPanel.vue b/resources/assets/js/pages/manage/components/ProjectPanel.vue index 231a42ff4..e7c0035fb 100644 --- a/resources/assets/js/pages/manage/components/ProjectPanel.vue +++ b/resources/assets/js/pages/manage/components/ProjectPanel.vue @@ -167,10 +167,11 @@ v-else-if="!isDepartmentReadonly" trigger="click" size="medium" + @visible-change="onColumnMenuVisible(column.id, $event)" @command="dropColumn(column, $event)"> -
  • +
    • @@ -742,6 +743,8 @@ export default { return { loading: false, + columnMenuIds: [], + nowTime: $A.dayjs().unix(), nowInterval: null, tableToday: $A.daytz().format('YYYY-MM-DD'), @@ -1514,6 +1517,12 @@ export default { }); }, + onColumnMenuVisible(columnId, visible) { + if (visible && !this.columnMenuIds.includes(columnId)) { + this.columnMenuIds.push(columnId) + } + }, + dropColumn(column, command) { if (this.isDepartmentReadonly) { return;