diff --git a/package.json b/package.json index a6a947d..a72b9d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@imzlh/vlist", - "version": "5.7.3", + "version": "5.8.0", "displayName": "vList", "description": "一个全能的现代化的文件管理UI,使用vue3", "license": "MIT", @@ -11,6 +11,10 @@ "file-sharing", "media-player" ], + "repository": { + "type": "git", + "url": "https://github.com/imzlh/vList5.git" + }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" diff --git a/src/App.vue b/src/App.vue index 27baa2f..56088e6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -129,13 +129,16 @@ if(locked) return; const target = e.target as HTMLElement; // 切换活动ID - if((target.classList.contains('item') || target.classList.contains('parent')) && target.dataset.position){ - const index = target.dataset.position.lastIndexOf(':'), - tree = await FS.stat(target.dataset.position!.substring(0, index)), - id = parseInt(target.dataset.position.substring(index + 1)); - current_tree = tree.type == 'dir' ? tree : tree.parent!, - current_index = id, handleUpdate(true); - } + if(target.classList.contains('item') || target.classList.contains('parent')) + if(target.dataset.position){ + const index = target.dataset.position.lastIndexOf(':'), + tree = await FS.stat(target.dataset.position!.substring(0, index)), + id = parseInt(target.dataset.position.substring(index + 1)); + current_tree = tree.type == 'dir' ? tree : tree.parent!, + current_index = id, handleUpdate(true); + }else{ + current_tree = TREE.parent!, current_index = 0, handleUpdate(true); + } }))); const tree_active = ref(false), diff --git a/src/module/tree.vue b/src/module/tree.vue index 568b3e2..c6d3650 100644 --- a/src/module/tree.vue +++ b/src/module/tree.vue @@ -265,7 +265,7 @@ @dragleave.stop="($event.currentTarget as HTMLElement).classList.remove('moving')" @click="data.active = new Map()" > -