feat: download UI + delete some space
This commit is contained in:
parent
02370f0220
commit
6e91f51a69
2 changed files with 67 additions and 49 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
import { useManualStore } from "@/stores/manual";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
|
@ -8,12 +9,13 @@ import { menuList } from "../interface/request/main/main";
|
|||
|
||||
const dataStore = useDataStore();
|
||||
const manualStore = useManualStore();
|
||||
const route = useRoute();
|
||||
const { toc } = storeToRefs(manualStore);
|
||||
const { loader } = storeToRefs(dataStore);
|
||||
|
||||
const drawerMini = ref(false);
|
||||
const drawerMain = ref(false);
|
||||
const search = ref('');
|
||||
const search = ref("");
|
||||
|
||||
/**
|
||||
* ปุ่มย่อ ขยาย สารบัญทางขวาของคู่มือ
|
||||
|
|
@ -38,6 +40,12 @@ onMounted(async () => {
|
|||
const data = await fetch("/toc.json").then((r) => r.json());
|
||||
menuList.value[1].children = data;
|
||||
});
|
||||
|
||||
const downloadFile = () => {
|
||||
const fileUrl = route.fullPath + ".pdf";
|
||||
console.log(route.fullPath);
|
||||
// window.open(fileUrl);
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- โครงเว็บ -->
|
||||
|
|
@ -66,7 +74,17 @@ onMounted(async () => {
|
|||
</q-btn>
|
||||
|
||||
<q-space />
|
||||
|
||||
<q-btn
|
||||
color="primary"
|
||||
label="ดาวน์โหลดคู่มือ"
|
||||
@click="downloadFile()"
|
||||
/>
|
||||
<q-btn
|
||||
color="primary"
|
||||
class="q-ml-md"
|
||||
label="ดาวน์โหลดคู่มือทั้งหมด"
|
||||
@click="downloadFile()"
|
||||
/>
|
||||
<q-btn
|
||||
size="13px"
|
||||
class="bg-blue-1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue