Using the v-text
directive to overwrite the existing text inside a paragraph.
<div id="app">
<p v-text="pText">Old text.</p>
</div>
Try it Yourself »
The v-text
directive is used to update the text in an element.
When updating text in an element with the v-text
directive, any existing text and child elements will be replaced by the new text.
Note: If you want to update just a part of a text inside a tag, consider using text interpolation {{ }}
instead.
Vue Tutorial: Text Interpolation
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!