This commit is contained in:
parent
a0f1d4d88a
commit
4eba859301
1 changed files with 9 additions and 10 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
// NOTE: Library
|
// NOTE: Library
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
|
|
||||||
// NOTE: Components
|
// NOTE: Components
|
||||||
|
|
||||||
|
|
@ -10,24 +9,18 @@ import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { useManualStore } from 'src/stores/manual';
|
import { useManualStore } from 'src/stores/manual';
|
||||||
import { useNavigator } from 'src/stores/navigator';
|
import { useNavigator } from 'src/stores/navigator';
|
||||||
import Expansion from 'src/components/14_report/Expansion.vue';
|
|
||||||
import { Icon } from '@iconify/vue/dist/iconify.js';
|
import { Icon } from '@iconify/vue/dist/iconify.js';
|
||||||
|
|
||||||
// NOTE: Variable
|
// NOTE: Variable
|
||||||
const manualStore = useManualStore();
|
const manualStore = useManualStore();
|
||||||
const navigatorStore = useNavigator();
|
const navigatorStore = useNavigator();
|
||||||
const { dataManual } = storeToRefs(manualStore);
|
const { dataManual } = storeToRefs(manualStore);
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
async function fetchManual() {
|
async function fetchManual() {
|
||||||
const res = await manualStore.getManual();
|
const res = await manualStore.getManual();
|
||||||
dataManual.value = res ? res : [];
|
dataManual.value = res ? res : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateTo(path: string) {
|
|
||||||
router.push(`${path}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
navigatorStore.current.title = 'menu.manual.title';
|
navigatorStore.current.title = 'menu.manual.title';
|
||||||
navigatorStore.current.path = [{ text: '' }];
|
navigatorStore.current.path = [{ text: '' }];
|
||||||
|
|
@ -40,7 +33,12 @@ onMounted(async () => {
|
||||||
class="column full-height no-wrap surface-1 rounded bordered overflow-hidden q-pa-sm"
|
class="column full-height no-wrap surface-1 rounded bordered overflow-hidden q-pa-sm"
|
||||||
>
|
>
|
||||||
<section class="scroll q-gutter-y-sm">
|
<section class="scroll q-gutter-y-sm">
|
||||||
<q-expansion-item v-for="v in dataManual" :content-inset-level="1">
|
<q-expansion-item
|
||||||
|
v-for="v in dataManual"
|
||||||
|
:content-inset-level="0.5"
|
||||||
|
class="rounded overflow-hidden bordered"
|
||||||
|
dense
|
||||||
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="row items-center full-width">
|
<div class="row items-center full-width">
|
||||||
<Icon
|
<Icon
|
||||||
|
|
@ -52,12 +50,13 @@ onMounted(async () => {
|
||||||
{{ $i18n.locale === 'eng' ? v.labelEN : v.label }}
|
{{ $i18n.locale === 'eng' ? v.labelEN : v.label }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-for="x in v.page"
|
v-for="x in v.page"
|
||||||
clickable
|
clickable
|
||||||
dense
|
dense
|
||||||
class="dot items-center rounded"
|
class="dot items-center rounded q-my-xs"
|
||||||
@click="() => navigateTo(`/manual/${v.category}/${x.name}`)"
|
:to="`/manual/${v.category}/${x.name}`"
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
v-if="!!x.icon"
|
v-if="!!x.icon"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue