15 lines
309 B
Vue
15 lines
309 B
Vue
<script setup>
|
|
import Mobile from './Mobile.vue'
|
|
import Pc from './Pc.vue'
|
|
|
|
// 仅按 UA 分流,不按宽度切换
|
|
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
navigator.userAgent,
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<Mobile v-if="isMobile" />
|
|
<Pc v-else />
|
|
</template>
|