Sfoglia il codice sorgente

紧急修正:缩小详情标题与正文间距

紧急修正:缩小详情标题与正文间距
dangyunlong 1 giorno fa
parent
commit
393067a8a3
2 ha cambiato i file con 16 aggiunte e 3 eliminazioni
  1. 2 2
      components/template/component/article/900x1384/1.vue
  2. 14 1
      pages/index.vue

+ 2 - 2
components/template/component/article/900x1384/1.vue

@@ -413,14 +413,14 @@ const closePreview = () => {
         display: flex;
         justify-content: flex-start;
         align-items: center;
-        margin-top: 30px;
+        margin-top: 20px;
         div{
             margin-right: 40px;
         }
     }
     .articleContent {
         width: 900px;
-        padding-top:60px;
+        padding-top:30px;
         font-size:20px;
         margin-bottom: 60px;
         img{

+ 14 - 1
pages/index.vue

@@ -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>