auto jump to mobile page when use mobile device access the page

This commit is contained in:
RockYang
2024-10-04 11:25:01 +08:00
parent 88e7c39066
commit e2960b2607
8 changed files with 27 additions and 26 deletions

View File

@@ -18,15 +18,8 @@
<script setup>
import {ref, watch} from "vue";
import {useRouter} from "vue-router";
import {isMobile} from "@/utils/libs";
import {useSharedStore} from "@/store/sharedata";
const router = useRouter()
if (!isMobile()) {
router.replace('/')
}
const active = ref('home')
const store = useSharedStore()
const theme = ref(store.mobileTheme)