From 181db69e0c651d8c23a0d1921f963039ff801b74 Mon Sep 17 00:00:00 2001 From: Kilisei <145594481+kilisei@users.noreply.github.com> Date: Sun, 22 Jun 2025 15:37:03 +0200 Subject: [PATCH] Use `shallowRef` instead of `ref` in `.vue` files where possible (#34813) This PR improves some `.vue` components by using `shallowRef instead of ref`, which `should improve performance`. It's probably not significant, but it's an improvement because Vue no longer deep watches the ref (shallowRef). Also i used `useTemplateRef` instead of `ref`. --------- Signed-off-by: wxiaoguang Co-authored-by: wxiaoguang --- web_src/js/components/ActivityHeatmap.vue | 4 +- web_src/js/components/ContextPopup.vue | 12 +++--- web_src/js/components/DiffFileTreeItem.vue | 4 +- .../js/components/PullRequestMergeForm.vue | 40 +++++++++---------- .../js/components/RepoActivityTopAuthors.vue | 8 ++-- web_src/js/components/RepoCodeFrequency.vue | 12 +++--- web_src/js/components/RepoRecentCommits.vue | 10 ++--- web_src/js/components/ViewFileTree.vue | 4 +- web_src/js/components/ViewFileTreeItem.vue | 8 ++-- 9 files changed, 51 insertions(+), 51 deletions(-) diff --git a/web_src/js/components/ActivityHeatmap.vue b/web_src/js/components/ActivityHeatmap.vue index eaa9b0ffb1..296cb61cff 100644 --- a/web_src/js/components/ActivityHeatmap.vue +++ b/web_src/js/components/ActivityHeatmap.vue @@ -1,7 +1,7 @@ diff --git a/web_src/js/components/RepoActivityTopAuthors.vue b/web_src/js/components/RepoActivityTopAuthors.vue index 77b85bd7e2..bbdfda41d0 100644 --- a/web_src/js/components/RepoActivityTopAuthors.vue +++ b/web_src/js/components/RepoActivityTopAuthors.vue @@ -1,9 +1,9 @@