|
@@ -70,7 +70,7 @@ import templateNewAndAd from '@/components/template/sector/body/index/list/1200x
|
|
|
|
|
|
//1.获得基本信息单元 start---------------------------------------->
|
|
|
//1.1获得页面依赖
|
|
|
-import { ref } from 'vue';
|
|
|
+import { ref,onMounted } from 'vue';
|
|
|
//1.2获得pinia源
|
|
|
import { useTemplateBaseStore } from '@/stores/templateBase'
|
|
|
const templateBaseStore:any = useTemplateBaseStore()
|
|
@@ -153,6 +153,19 @@ try {
|
|
|
navigateTo('/error?findPage=index')
|
|
|
}
|
|
|
//2.页面数据 end---------------------------------------->
|
|
|
+
|
|
|
+//3.响应式 start ---------------------------------------->
|
|
|
+onMounted(() => {
|
|
|
+ //监听窗口大小
|
|
|
+ window.addEventListener('resize', () => {
|
|
|
+ if(window.innerWidth < 1200){
|
|
|
+ console.log('展示移动端!')
|
|
|
+ }else{
|
|
|
+ console.log('展示PC端!')
|
|
|
+ }
|
|
|
+ })
|
|
|
+})
|
|
|
+//3.响应式 end---------------------------------------->
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|