vue offsetTop顶部距离
<template>
<div class="hello">
<ul class="content" ref="content">
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
mounted() {
console.log(this.$refs.content.offsetTop);
}
}
</script>