Open gitakachan opened 2 years ago
參考:https://www.itread01.com/content/1547429964.html
<a @click.prevent="returnTop(this.$refs.tapiei)" href="#" class="text-success" >台北 </a> <!-- 按<a>跳轉至此 --> <div ref="tapiei"> <h2>台北</h2> </div>
methods: { returnTop(ref) { ref.scrollIntoView(true); }, },
參考:https://www.itread01.com/content/1547429964.html