maping manual to json file
This commit is contained in:
parent
f5fe7f424c
commit
245d57fc93
2 changed files with 47 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import manual from "@/manual.json";
|
||||
|
||||
import type {
|
||||
ScrollType,
|
||||
|
|
@ -474,6 +475,16 @@ watch(
|
|||
}
|
||||
}
|
||||
);
|
||||
|
||||
const handleButtonClick = () => {
|
||||
const currentPath = route.path;
|
||||
const popupPath = manual[currentPath as keyof typeof manual];
|
||||
if (popupPath) {
|
||||
window.open(popupPath);
|
||||
} else {
|
||||
alert("No mapping found for this route");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- โครงเว็บ -->
|
||||
|
|
@ -513,6 +524,17 @@ watch(
|
|||
<q-icon name="mdi-magnify" size="20px" color="grey-7" />
|
||||
</q-btn>
|
||||
-->
|
||||
<q-btn
|
||||
round
|
||||
dense
|
||||
flat
|
||||
size="13px"
|
||||
class="q-mx-md bg-grey-3"
|
||||
:color="totalNoti === 0 ? 'grey-6' : 'grey-8'"
|
||||
@click="handleButtonClick()"
|
||||
>
|
||||
<q-icon name="mdi-book" size="18px" color="grey-7" />
|
||||
</q-btn>
|
||||
<!-- Notification -->
|
||||
<q-btn
|
||||
round
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue