Selaa lähdekoodia

兼容支付宝内嵌浏览器(uc10);热点列表弹出时至少流出320px的空间。

任一存 2 vuotta sitten
vanhempi
commit
32015681a6

+ 1 - 0
.browserslistrc

@@ -1,4 +1,5 @@
 > 1%
 last 2 versions
+and_uc 9
 not dead
 not ie 11

+ 19 - 1
babel.config.js

@@ -1,3 +1,21 @@
 module.exports = {
-  presets: ["@vue/cli-plugin-babel/preset"],
+  presets: [
+    '@vue/cli-plugin-babel/preset',
+    [
+      '@babel/preset-env',
+      {
+        'useBuiltIns': 'entry',
+        'corejs': 3, // 指定 corejs 的版本,如果package.json没有core-js,还需要另外安装
+        "targets":['and_uc 9']
+      }
+    ]
+  ],
+  "plugins": [ // 如未用到@babel/plugin-transform-runtime可不配置
+    [
+      "@babel/plugin-transform-runtime",
+      {
+        "corejs": 3 // 指定 runtime-corejs 的版本,目前有 2 3 两个版本
+      }
+    ]
+  ]
 };

+ 3 - 0
public/show.html

@@ -14,6 +14,9 @@
     <title>-</title>
   </head>
   <body>
+    <script>
+      window.alert('sdfsdkfj')
+    </script>
     <div id="app"></div>
     <!-- built files will be auto injected -->
     <script src="<%= VUE_APP_STATIC_DIR %>/lib/jquery-2.1.1.min.js"></script>

+ 3 - 0
public/showMobile.html

@@ -16,6 +16,9 @@
     <title>-</title>
   </head>
   <body>
+    <script>
+      window.alert('mobile sdfsdkfj')
+    </script>
     <div id="app"></div>
     <!-- built files will be auto injected -->
     <script src="<%= VUE_APP_STATIC_DIR %>/lib/jquery-2.1.1.min.js"></script>

+ 12 - 13
src/components/UIGather/mobile/control/hotspotList.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="tag-layer" @click.stop>
-    <img @click.stop="close" :src="require('@/assets/images/js_icon/close.png')" class="close" alt="">
     <div class="hotlistcon">
+      <img @click.stop="close" :src="require('@/assets/images/js_icon/close.png')" class="close" alt="">
       <img class="htitle" :src="require('@/assets/images/js_icon/hotlisticon.png')" alt="">
       <ul v-if="hotspots.length > 0">
         <li @click="onclickHotpost(item)" v-for="item in hotspots" :key="item.name">
@@ -64,25 +64,24 @@ const close = () => {
   justify-content: center;
   align-items: flex-end;
 
-  .close {
-    color: rgba(255, 255, 255, 0.6);
-    z-index: 999;
-    position: absolute;
-    right: 18px;
-    bottom: 67%;
-    width: 34px;
-  }
-
   .hotlistcon {
     display: flex;
     position: relative;
     align-items: flex-start;
     justify-content: center;
-    height: 65%;
+    height: 50%;
+    max-height: calc(100% - 320px);
     width: 100%;
     background-size: 100% 100%;
     background-image: url(@/assets/images/js_icon/hotspot_bg.png);
-
+    .close {
+      color: rgba(255, 255, 255, 0.6);
+      z-index: 999;
+      position: absolute;
+      right: 18px;
+      top: 10px;
+      width: 34px;
+    }
     .htitle {
       position: absolute;
       left: 50%;
@@ -96,7 +95,7 @@ const close = () => {
       border-radius: 10px;
       font-size: 14px;
       color: #fff;
-      max-height: calc(100% - 60px);
+      height: 100%;
       overflow-y: auto;
       margin: 40px 10px;