Skip to content

Commit

Permalink
✨ 重构代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaojun1998 committed Nov 26, 2022
1 parent 692159e commit 9d05e3c
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/pages/file.vue
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
<Link></Link>

<!-- 上传框 -->
<ZUpload @close="loadFileAndConfig"></ZUpload>
<ZUpload @close="loadFile"></ZUpload>

<!-- 音频播放器 -->
<audio-player></audio-player>
Expand Down Expand Up @@ -499,19 +499,12 @@ let { checkSelectable, selectRowsChange, selectRow, selectRows, selectStatistics
// 初始化时,加载文件列表
onBeforeMount(() => {
loadFileAndConfig();
loadFile();
})
const loadFileAndConfig = () => {
if (route.params.storageKey) {
loadFile();
loadFileConfig();
}
}
// 切换存储源或路径时,重新加载文件列表
watch(() => [route.params.storageKey, route.params.fullpath], () => {
loadFileAndConfig();
loadFile();
})
const {
Expand Down

0 comments on commit 9d05e3c

Please sign in to comment.