Browse Source

H5-商品购买左侧导航

panyong 3 years ago
parent
commit
6cf1fae4e5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      htmldev/dashboard/src/views/sell/goods/index.vue

+ 2 - 1
htmldev/dashboard/src/views/sell/goods/index.vue

@@ -110,7 +110,8 @@ export default {
       }
       let foodList = this.$refs.foodList
       let el = foodList[index]
-      this.foodsScroll.scrollToElement(el, 300)
+      // offsetY的值改为3,是因为px转rem有误差,iOS12.4.1点击左侧导航时,当前点击的菜单无法被选中,类似一个修正值
+      this.foodsScroll.scrollToElement(el, 300, true, 3)
     },
     selectFood (food, event) {
       if (!event._constructed) {