fix: close search when click on top tree

This commit is contained in:
puri-ph4tt 2023-12-08 10:30:28 +07:00
parent 73821d4d2b
commit e05545f017
2 changed files with 4 additions and 0 deletions

View file

@ -83,6 +83,7 @@ onMounted(async () => {
() => { () => {
currentPath = '' currentPath = ''
getFolder(currentPath) getFolder(currentPath)
isSearch = false
} }
" "
>ดเกบเอกสาร</span >ดเกบเอกสาร</span

View file

@ -3,7 +3,9 @@ import { useLoader } from '@/stores/loader'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import profile from '@/components/Profile.vue' import profile from '@/components/Profile.vue'
import { useTreeDataStore } from '@/stores/tree-data' import { useTreeDataStore } from '@/stores/tree-data'
import { useSearchDataStore } from '@/stores/searched-data';
const { currentPath } = storeToRefs(useTreeDataStore()) const { currentPath } = storeToRefs(useTreeDataStore())
const { isSearch } = storeToRefs(useSearchDataStore())
const { getFolder } = useTreeDataStore() const { getFolder } = useTreeDataStore()
const loaderStore = useLoader() const loaderStore = useLoader()
const { loader } = storeToRefs(loaderStore) const { loader } = storeToRefs(loaderStore)
@ -32,6 +34,7 @@ const { loader } = storeToRefs(loaderStore)
() => { () => {
currentPath = '' currentPath = ''
getFolder(currentPath) getFolder(currentPath)
isSearch = false
} }
" "
> >