Commit 701c5bd3 authored by linxin's avatar linxin

Merge branch 'liuin' into uat

parents 3bf405ab 07e4136d
...@@ -123,6 +123,26 @@ export default { ...@@ -123,6 +123,26 @@ export default {
event.target.type = 'text' event.target.type = 'text'
this.focused = false this.focused = false
}, },
// 取窗口可视范围的高度
getClientHeight () {
var clientHeight = 0
if (document.body.clientHeight && document.documentElement.clientHeight) {
clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
} else {
clientHeight = (document.body.clientHeight > document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
}
return clientHeight
},
// 取窗口滚动条高度
getOffsetTop (obj) {
var tmp = obj.offsetTop
var node = obj.offsetParent
while (node != null) {
tmp += node.offsetTop
node = node.offsetParent
}
return tmp
},
}, },
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment