Merge branch 'main' of git.zdool.com:xs/ggfwjsc

This commit is contained in:
姚宇浩 2024-07-24 15:24:46 +08:00
commit ea5d60501a
1 changed files with 21 additions and 10 deletions

View File

@ -13,8 +13,19 @@
<script setup> <script setup>
import Header from "../components/header.vue"; import Header from "../components/header.vue";
import { ref, onMounted, onBeforeMount } from "vue"; import { ref, onMounted, onBeforeMount ,watch} from "vue";
import { useRouter, useRoute } from "vue-router";
const router = useRouter();
const routers = useRoute();
console.log(routers.path);
watch(
() => routers.path,
(newVal, oldVal) => {
if (routers.path == '/home/index/map') {
reset_font()
}
}
);
const reset_font = () => { const reset_font = () => {
let width = document.documentElement.clientWidth || document.body.clientWidth; let width = document.documentElement.clientWidth || document.body.clientWidth;
let height = let height =
@ -30,7 +41,7 @@ const reset_font = () => {
document.querySelector(".header_content").style.transform = document.querySelector(".header_content").style.transform =
"scale(" + width / 1920 + "," + height / 1080 + ")"; "scale(" + width / 1920 + "," + height / 1080 + ")";
if ( if (
document.querySelector(".left").style){ document.querySelector(".left")) {
document.querySelector(".left").style.transformOrigin = "bottom left"; document.querySelector(".left").style.transformOrigin = "bottom left";
document.querySelector(".left").style.transform = document.querySelector(".left").style.transform =
"scale(" + width / 1920 + "," + height / 1080 + ")"; "scale(" + width / 1920 + "," + height / 1080 + ")";