解决办法
<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