<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>
2023-12-31 13:43:17
<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>
下一篇:每日一练-leetcode