diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-05-30 18:53:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 18:53:15 +0800 |
commit | ee99cf6313ba565523b3c43f61ffda4b71e2c39b (patch) | |
tree | 176d0044803285f2cdbcf04cbf87edd2f0d07a1a /web_src/js/components/DiffFileTreeItem.vue | |
parent | 32185efc1484c1d6ea3a5262a3c9779e8edb0b09 (diff) | |
download | gitea-ee99cf6313ba565523b3c43f61ffda4b71e2c39b.tar.gz gitea-ee99cf6313ba565523b3c43f61ffda4b71e2c39b.zip |
Refactor diffFileInfo / DiffTreeStore (#24998)
Follow #21012, #22399
Replace #24983, fix #24938
Help #24956
Now, the `window.config.pageData.diffFileInfo` itself is a reactive
store, so it's quite easy to sync values/states by it, no need to do
"doLoadMoreFiles" or "callback".
Screenshot: these two buttons both work. After complete loading, the UI
is also right.
<details>



</details>
Diffstat (limited to 'web_src/js/components/DiffFileTreeItem.vue')
-rw-r--r-- | web_src/js/components/DiffFileTreeItem.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/components/DiffFileTreeItem.vue b/web_src/js/components/DiffFileTreeItem.vue index baaa01b782..916b8cdc73 100644 --- a/web_src/js/components/DiffFileTreeItem.vue +++ b/web_src/js/components/DiffFileTreeItem.vue @@ -40,7 +40,7 @@ <script> import {SvgIcon} from '../svg.js'; -import {DiffTreeStore} from '../modules/stores.js'; +import {diffTreeStore} from '../modules/stores.js'; export default { components: {SvgIcon}, @@ -56,7 +56,7 @@ export default { }, }, data: () => ({ - store: DiffTreeStore, + store: diffTreeStore(), collapsed: false, }), methods: { |