LogRocket Bloghttps://blog.logrocket.com/getting-elementGetting an element within a component with 2021年12月14日 · Getting an element by ID. The element can be selected through its ID by passing the ID name into the querySelector method. To demonstrate, let’s create a hidden text page with a button called show hidden softwo.cn更多内容请查看https://blog.logrocket.com/getting-element-component-vue-queryselector/
Koen WoortmanGet an element by its ID using Vue.js Learn how to use template refs to access HTML elements in your Vue code. See examples of accessing refs using the options API and the composition API.更多内容请查看https://koenwoortman.com/vuejs-get-element-by-id-in-component/