fix: typo
This commit is contained in:
1 parent
f3a36af629
commit
482743bf3a
1 file changed
+7
-1
@@ -68,7 +68,8 @@
|
|||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<div class="flex items-center justify-between px-5 py-4 border-t border-border shrink-0">
|
<div class="flex items-center justify-between px-5 py-4 border-t border-border shrink-0">
|
||||||
<span class="text-xs text-muted font-mono truncate max-w-xs">{{ current }}</span>
|
<span class="text-xs text-muted font-mono truncate max-w-xs">{{ current }}</span>
|
||||||
<button @click="$emit('select', current.replace(/\\/+$/, '') || '/')" class="btn-primary">
|
<!-- FIX : regex sortie dans selectCurrent() pour éviter l'erreur de parsing Vue -->
|
||||||
|
<button @click="selectCurrent()" class="btn-primary">
|
||||||
Choisir
|
Choisir
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -91,6 +92,11 @@ const parent = ref<string | null>(null)
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const error = ref('')
|
const error = ref('')
|
||||||
|
|
||||||
|
// FIX : la regex /\/+$/ dans un @click inline fait planter le parser Vue
|
||||||
|
function selectCurrent() {
|
||||||
|
emit('select', current.value.replace(/\/+$/, '') || '/')
|
||||||
|
}
|
||||||
|
|
||||||
function joinPath(base: string, name: string): string {
|
function joinPath(base: string, name: string): string {
|
||||||
if (base === '/') return `/${name}`
|
if (base === '/') return `/${name}`
|
||||||
const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base
|
const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base
|
||||||
|
|||||||
Reference in new issue
Block a user