feat: breadcrumbs
This commit is contained in:
parent
cbad753124
commit
fff9d62d80
1 changed files with 48 additions and 27 deletions
|
|
@ -16,8 +16,8 @@ const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แ
|
||||||
|
|
||||||
const { isFilePreview } = storeToRefs(useFileInfoStore())
|
const { isFilePreview } = storeToRefs(useFileInfoStore())
|
||||||
const { isSearch } = storeToRefs(useSearchDataStore())
|
const { isSearch } = storeToRefs(useSearchDataStore())
|
||||||
const { data, currentDept } = storeToRefs(useTreeDataStore())
|
const { data, currentDept, currentPath } = storeToRefs(useTreeDataStore())
|
||||||
const { createFolder, getCabinet, gotoParent } = useTreeDataStore()
|
const { createFolder, getCabinet, gotoParent, getFolder } = useTreeDataStore()
|
||||||
|
|
||||||
const viewMode = ref<'view_list' | 'view_module'>('view_list')
|
const viewMode = ref<'view_list' | 'view_module'>('view_list')
|
||||||
const inputSearch = ref<string>()
|
const inputSearch = ref<string>()
|
||||||
|
|
@ -97,7 +97,8 @@ onMounted(getCabinet)
|
||||||
<search-bar v-if="mode === 'user'" />
|
<search-bar v-if="mode === 'user'" />
|
||||||
<div class="bg-white q-pa-md">
|
<div class="bg-white q-pa-md">
|
||||||
<div class="row items-center justify-between">
|
<div class="row items-center justify-between">
|
||||||
<span class="text-h6">
|
<span class="text-body1">
|
||||||
|
<div class="row items-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
|
|
@ -105,11 +106,20 @@ onMounted(getCabinet)
|
||||||
v-if="currentDept > 0 && isSearch === false"
|
v-if="currentDept > 0 && isSearch === false"
|
||||||
@click="() => gotoParent()"
|
@click="() => gotoParent()"
|
||||||
>
|
>
|
||||||
<q-icon name="arrow_back" size="1rem" color="primary"
|
<q-icon name="arrow_back" size="1rem" color="primary" />
|
||||||
/></q-btn>
|
</q-btn>
|
||||||
<span v-if="isSearch === false">{{
|
<q-breadcrumbs v-if="isSearch === false" active-color="primary">
|
||||||
DEPT_NAME[currentDept]
|
<q-breadcrumbs-el
|
||||||
}}</span>
|
v-if="currentPath === '/' || !currentPath"
|
||||||
|
label="ตู้เอกสารทั้งหมด"
|
||||||
|
/>
|
||||||
|
<q-breadcrumbs-el
|
||||||
|
class="text-black"
|
||||||
|
v-for="fragments in currentPath.split('/').filter(Boolean)"
|
||||||
|
:label="fragments"
|
||||||
|
/>
|
||||||
|
</q-breadcrumbs>
|
||||||
|
</div>
|
||||||
<span v-if="isSearch === true">ผลการค้นหา</span>
|
<span v-if="isSearch === true">ผลการค้นหา</span>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -123,11 +133,21 @@ onMounted(getCabinet)
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
icon="add"
|
icon="add"
|
||||||
@click="()=> triggerFolderCreate()"
|
@click="() => triggerFolderCreate()"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
<div>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
|
dense
|
||||||
|
color="blue-grey-2"
|
||||||
|
icon="refresh"
|
||||||
|
class="q-mr-sm"
|
||||||
|
@click="() => getFolder(currentPath)"
|
||||||
|
/>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
dense
|
||||||
color="blue-grey-2"
|
color="blue-grey-2"
|
||||||
:icon="viewMode"
|
:icon="viewMode"
|
||||||
@click="
|
@click="
|
||||||
|
|
@ -138,6 +158,7 @@ onMounted(getCabinet)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<file-searched v-if="isSearch === true" />
|
<file-searched v-if="isSearch === true" />
|
||||||
<file-item
|
<file-item
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue