diff --git a/order-app/src/pages/category/category.vue b/order-app/src/pages/category/category.vue index ff445b6..ddf9154 100644 --- a/order-app/src/pages/category/category.vue +++ b/order-app/src/pages/category/category.vue @@ -46,7 +46,7 @@ const scrollTop = ref(0) const current = ref(0) const menuHeight = ref(0) - const menuItemHeight = ref(0) const getImg = ()=>{ + const menuItemHeight = ref(0) const getImg = () => { return Math.floor(Math.random() * 35) } @@ -63,7 +63,7 @@ // 将菜单菜单活动item垂直居中 scrollTop.value = index * menuItemHeight.value + menuItemHeight.value / 2 - menuHeight.value / 2; } -{ + const getElRect = (elClass, dataVal) => { new Promise((resolve, reject) => { const query = uni.createSelectorQuery().in(instance);