In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces vue.js how to delete dom nodes, the article is very detailed, has a certain reference value, interested friends must read it!
Vue.js delete dom node method: 1, v-for loop dom node to ensure that each li has a delete button, and bind delete event; 2, delete dom node, such as [this.datahistory.splice (this.$refs.li [index], 1)].
The operating environment of this paper: windows10 system, vue.js 2.9, thinkpad T480 computer.
Vue deletes the current dom node in two steps:
Step 1: v-for loop dom node, ensure that each li has a delete button, and bind the delete event
{{item}} delete
Step 2: delete the dom node
DeleteFn () {this.datahistory.splice (this.$refs.li [index], 1) / Click to call the delete method to delete the subscript item index in the datahistory array, and the 1 after the comma represents the deletion of the current 1 item} above is all the content of the article "how to delete dom nodes by vue.js". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.