fix: computation of file path
parent
d29ad356d1
commit
c4725428e0
|
@ -41,12 +41,11 @@ const container = ref<HTMLElement | null>(null);
|
||||||
|
|
||||||
const path = computed(() => {
|
const path = computed(() => {
|
||||||
let basePath = fileStore.isFiles ? route.path : url.removeLastDir(route.path);
|
let basePath = fileStore.isFiles ? route.path : url.removeLastDir(route.path);
|
||||||
|
if (!basePath.endsWith("/")) {
|
||||||
|
basePath += "/";
|
||||||
|
}
|
||||||
basePath += props.name;
|
basePath += props.name;
|
||||||
|
return basePath.split("/").filter(Boolean).splice(1);
|
||||||
return basePath
|
|
||||||
.replace(/^\/[^\/]+/, "")
|
|
||||||
.split("/")
|
|
||||||
.filter(Boolean);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(path, () => {
|
watch(path, () => {
|
||||||
|
|
Loading…
Reference in New Issue