需要在input上绑定blur事件监听输入完成
data() {
return {
txPop:false,
allMoney:'',
money:'',
windowHeight:0,
}
},
onLoad() {
var that = this;
// #ifdef H5
that.windowHeight = window.innerHeight;
// #endif
},
methods: {
// #ifdef H5
setwin:function(){
var that = this;
var windowFocusHeight = window.innerHeight;
if (that.windowHeight == windowFocusHeight) {
return
}
var currentPosition;
var speed = 1; //页面滚动距离
currentPosition = document.documentElement.scrollTop || document.body.scrollTop;
currentPosition -= speed;
window.scrollTo(0, currentPosition); //页面向上滚动
currentPosition += speed; //speed变量
window.scrollTo(0, currentPosition); //页面向下滚动
},
// #endif
}