refactor: clean about search
This commit is contained in:
parent
74c5115e95
commit
aa63e9c8c5
3 changed files with 17 additions and 4 deletions
|
|
@ -1,5 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useTreeDataStore, type TreeDataFolder } from '@/stores/tree-data'
|
||||
import { useSearchDataStore } from '@/stores/searched-data'
|
||||
import { useFileInfoStore } from '@/stores/file-info-data'
|
||||
|
||||
const { isSearch } = storeToRefs(useSearchDataStore())
|
||||
const { isPreview } = storeToRefs(useFileInfoStore())
|
||||
const { getFolder } = useTreeDataStore()
|
||||
|
||||
const props = withDefaults(
|
||||
|
|
@ -17,7 +23,13 @@ const props = withDefaults(
|
|||
<div>
|
||||
<q-list v-for="folder in data" class="rounded-borders">
|
||||
<q-expansion-item
|
||||
@click="() => getFolder(folder.pathname, false)"
|
||||
@click="
|
||||
() => {
|
||||
getFolder(folder.pathname, false)
|
||||
isSearch = false
|
||||
isPreview = false
|
||||
}
|
||||
"
|
||||
:header-inset-level="level * 0.25"
|
||||
:group="level.toString()"
|
||||
:hide-expand-icon="level === 4"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue