diff options
author | André Jaenisch <Ryuno-Ki@users.noreply.github.com> | 2022-10-01 16:26:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-01 22:26:38 +0800 |
commit | 04e97b83115e7439d43c0ede5fe2d1b50d201c52 (patch) | |
tree | 073a20e9377c5197112327afd11d7a6f2cccb268 /web_src/js/components/DiffFileTree.vue | |
parent | 726afe8a9e33128476e1dc85f262fe56f995d12c (diff) | |
download | gitea-04e97b83115e7439d43c0ede5fe2d1b50d201c52.tar.gz gitea-04e97b83115e7439d43c0ede5fe2d1b50d201c52.zip |
Refactor from Vue2 to Vue3 (#20044)
Close #19902
Diffstat (limited to 'web_src/js/components/DiffFileTree.vue')
-rw-r--r-- | web_src/js/components/DiffFileTree.vue | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index d0962254cd..717ba70f7f 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -1,11 +1,10 @@ <template> <div - v-show="fileTreeIsVisible" - id="diff-file-tree" + v-if="fileTreeIsVisible" class="mr-3 mt-3 diff-detail-box" > <!-- only render the tree if we're visible. in many cases this is something that doesn't change very often --> - <div class="ui list" v-if="fileTreeIsVisible"> + <div class="ui list"> <DiffFileTreeItem v-for="item in fileTree" :key="item.name" :item="item" /> </div> <div v-if="isIncomplete" id="diff-too-many-files-stats" class="pt-2"> @@ -117,6 +116,9 @@ export default { const [toShow, toHide] = document.querySelectorAll('.diff-toggle-file-tree-button .icon'); toShow.classList.toggle('hide', visible); // hide the toShow icon if the tree is visible toHide.classList.toggle('hide', !visible); // similarly + + const diffTree = document.getElementById('diff-file-tree'); + diffTree.classList.toggle('hide', !visible); }, loadMoreData() { this.isLoadingNewData = true; |