Home  >  Article  >  What should I do if vue.js cannot trigger events?

What should I do if vue.js cannot trigger events?

藏色散人
藏色散人Original
2021-01-14 09:33:333280browse

vue.js cannot trigger the event because vue does not parse and render it as a vue template. The solution is not to use v-html, but to compile and render the front-end data through the component template.

What should I do if vue.js cannot trigger events?

The operating environment of this tutorial: windows7 system, vue3 version, DELL G3 computer.

vue.js v-html cannot trigger click event?

Background:

The backend returns data in html format to the frontend, and the frontend uses v-html to parse and render, such as: , the a tag can be rendered successfully, but the event bound to it cannot be triggered.

Cause:

vue does not parse and render it as a vue template

Solution:

Don’t use v-html but component template compilation

Online information:


 

 

Page:

What should I do if vue.js cannot trigger events?

Console:

What should I do if vue.js cannot trigger events?

【Recommended related articles: vue.js

The above is the detailed content of What should I do if vue.js cannot trigger events?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn