浏览代码

bug fix: goods-list中因为new Swiper时规定了touchMove时要preventDefault,导致safari环境下子元素无法通过touchmove来scroll。

任一存 1 年之前
父节点
当前提交
a2e4e979b3
共有 2 个文件被更改,包括 3 次插入8 次删除
  1. 1 0
      public/index.html
  2. 2 8
      src/components/Tags/goods-list.vue

+ 1 - 0
public/index.html

@@ -41,6 +41,7 @@
       if ((query = window.location.href.indexOf('vlog') != -1)) {
         var vConsole = new window.VConsole();
       }
+      // new VConsole()
     </script>
   </body>
 </html>

+ 2 - 8
src/components/Tags/goods-list.vue

@@ -242,7 +242,7 @@ const brandScroll = () => {
         on: {
           touchMove(swiper, e) {
             e.stopPropagation();
-            e.preventDefault();
+            // e.preventDefault();
           },
           slideChange() {
             if (tagclick.value.type) {
@@ -313,19 +313,14 @@ onMounted(() => {
         > div {
           background: #fff;
           padding-bottom: 14px;
-          height: 95%;
-          // 用flex布局实现中间部分可scroll的方案在ios中不生效
-          // display: flex;
-          // flex-direction: column;
+          height: 100%;
           >.imgcon{
-            // flex: 0;
             height: 34vh;
           }
           .info {
             font-size: 14px;
             color: #131d34;
             padding: 16px 20px;
-            // flex: 0 1 auto;
             max-height: calc(100% - 34vh - 42px);
             box-sizing: border-box;
             overflow: auto;
@@ -404,7 +399,6 @@ onMounted(() => {
             }
           }
           .goods-button {
-            // flex: 0;
             display: flex;
             justify-content: space-between;
             font-size: 16px;