Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
g122622 committed Feb 18, 2024
1 parent bd0120f commit b93ffeb
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/components/FileMgr/FileMgr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ const addList = [
const ClipBoardRef = ref()
// <生命周期&初始化>
const initAll = () => {
const initAll = async () => {
isLoading.value = true
console.log("FileMgr.vue-1")

Check warning on line 210 in src/components/FileMgr/FileMgr.vue

View workflow job for this annotation

GitHub Actions / build and release electron app (windows-latest)

Unexpected console statement
gotoDir(props.adapter.getCurrentDirectory(), true)
await gotoDir(props.adapter.getCurrentDirectory(), true)
console.log("FileMgr.vue-2")

Check warning on line 213 in src/components/FileMgr/FileMgr.vue

View workflow job for this annotation

GitHub Actions / build and release electron app (windows-latest)

Unexpected console statement
watch(viewOptions, (newVal, oldVal) => {
// 保存viewOptions
Expand Down Expand Up @@ -237,7 +237,7 @@ const mergeOptions = () => {
const options = reactive(mergeOptions())
onMounted(async () => {
initAll()
await initAll()
})
// <核心功能-文件相关>
Expand All @@ -250,20 +250,34 @@ watch(() => props.directory, async (newVal) => {
const gotoDir = async (arg: Addr, pushHistory: boolean) => {
isLoading.value = true
// 保存布局选项
console.log("[2]FileMgr.vue-1")
await tryToSaveViewOptions()
console.log("[2]FileMgr.vue-2")
// adapter切换当前目录
await props.adapter.changeCurrentDirectory(arg)
console.log("[2]FileMgr.vue-3")
// 更改currentFileTable
currentDir.value = arg
console.log("[2]FileMgr.vue-4")
currentFileTable.value = await props.adapter.getCurrentFileTable()
console.log("[2]FileMgr.vue-5")
// 加载新的布局选项
await tryToGetAndApplyViewOptions()
console.log("[2]FileMgr.vue-6")
// 取消选择的所有item
selectedItems.value.clear()
console.log("[2]FileMgr.vue-7")
if (pushHistory) {
console.log("[2]FileMgr.vue-8")
operationHistory.value.push(lodash.cloneDeep(arg))
console.log("[2]FileMgr.vue-9")
}
isLoading.value = false
}
Expand Down

0 comments on commit b93ffeb

Please sign in to comment.