How to bind a click event on “v-html” in Vue
问题 I have a simple example in jsfiddle, as described in the example, I want to insert the element via v-html and then bind the event in the insert element. In addition to adding id operation dom this way, is there a better way? https://jsfiddle.net/limingyang/bnLmx1en/1/ <script src="https://unpkg.com/vue/dist/vue.js"></script> <div id="app"> <div v-html="link"></div> </div> var app = new Vue({ el: '#app', data: { link: '<a href="javascript:void(0)">click me</a>' } }) 回答1: You can add a ref on