Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the difference between v-text and v-html in vue

Shulou Source: shulou.com Published: 2022-06-03 16:49:23 11月14日 Update

Xiaobian to share with you what is the difference between {{}},v-text and v-html in vue, I believe most people still don't know how to understand, so share this article for your reference, I hope you have a lot to gain after reading this article, let's go to understand it together!

{

{}}Get value, will not empty the original content of the tag

v-text Gets the value, clears the original content of the label, and outputs plain text

v-html Get the value, it will clear the original content of the tag, if the data contains html tags, output them as html tags after parsing

Title

Good morning {{info}}

Good Morning

Good Morning

hhh

hhh

hhh

hhh

new Vue({ el:"#app", data:{ info:"good", addr:"Click to enter Baidu", addr2:'Baidu' } });

The above is "vue {{}},v-text and v-html what is the difference" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Tags: Content tags articles output not much most data text more knowledge industry information information channels channels package reference learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia OPPO Reno MySQL Shulou Tech Info