From 4cd95143d8a8a00e1c09ec433e04175e978c766b Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:53:31 +0700 Subject: [PATCH] feat: change location on edit file This also fix when edit file on seach which cannot detect existing file(s) --- Services/client/src/components/FileFormWrapper.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Services/client/src/components/FileFormWrapper.vue b/Services/client/src/components/FileFormWrapper.vue index 1857c38..fcabcce 100644 --- a/Services/client/src/components/FileFormWrapper.vue +++ b/Services/client/src/components/FileFormWrapper.vue @@ -7,7 +7,7 @@ import UploadExistDialog from './UploadExistDialog.vue' const storageStore = useStorage() const { file, currentInfo } = storeToRefs(storageStore) -const { createFile, updateFile } = storageStore +const { createFile, updateFile, goto } = storageStore const fileFormState = ref(false) const fileFormPath = ref('') @@ -61,6 +61,10 @@ function triggerFileEdit( metadata: value.metadata, } fileNameLabel.value = file + + const arr = pathname.split('/') + arr[arr.length - 1] = '' + goto(arr.join('/')) } defineExpose({