阻止父元素滚动

195 阅读1分钟

image.png 使用 @mousewheel.stop @DOMMouseScroll.stop 阻止number input鼠标滚动影响页面滚动位置

<el-input
  v-if="!isViewing"
  type="number"
  oninput="if(value<0)value=0"
  v-model="askItem.score"
  placeholder="分值"
  class="tagAskForColumn-score tagAskForColumn-right"
  @change="emits('change')"
  @mousewheel.stop
  @DOMMouseScroll.stop
/>