Explorar o código

H5-商品购买左侧导航

panyong %!s(int64=3) %!d(string=hai) anos
pai
achega
6cf1fae4e5
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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) {