refactor: add Path go back

This commit is contained in:
somnetsak123 2023-12-04 11:47:33 +07:00
parent 1f4129a1b9
commit 577206dfc1

View file

@ -112,9 +112,23 @@ onMounted(getCabinet)
label="ตู้เอกสารทั้งหมด"
/>
<q-breadcrumbs-el
class="text-black"
v-for="fragments in currentPath.split('/').filter(Boolean)"
class="text-primary pointer"
v-for="(fragments, index) in currentPath
.split('/')
.filter(Boolean)"
:label="fragments"
@click="
() => {
currentPath =
currentPath
.split('/')
.filter(Boolean)
.slice(0, index + 1)
.join('/') + '/'
getFolder(currentPath)
}
"
/>
</q-breadcrumbs>
</div>