0
点赞
收藏
分享

微信扫一扫

针对鼠标滚轮使用时滚动上下跳动失灵问题的极简有效处理办法

guanguans 04-01 12:00 阅读 1

在这里插入图片描述
解决办法

<view class='pages'>
	<view>
		<scroll-view scroll-y="{{sysScroll}}"  scroll-top="{{scrollTop}}" class="scroll-hei-2 bg-def">
	...
      <input bindfocus="onfocus" bindblur="onblur" placeholder="请输入药品名称" v-model="value"  />
      ...
</scroll-view>
	</view>
</view>
<script>
export default {
		data() {
			return {
				sysScroll:'true',
				value:'',
			}
		},
			methods: {
			onfocus() {
			    this.sysScroll=false
			  },
			  onblur() {
			    this.sysScroll= true
			  },
			  }
	}
</
script>
<style scope >
.pages {
	//height:100vh;
}
</style>

最上层的父级元素去掉 height:100vh

举报

相关推荐

0 条评论