Vue - usage of v-pre directive - 2020.11.14

1. v-pre

  • v-pre is used to skip the compilation process of this element and its child elements, used to display the original Mustache syntax

2. Code combat

<!--作者:key-->
<!--浏览工具:Chrome-->
<!--开发工具:WebStorm-->
<!--开发时间:2020/11/14 10:26-->

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

<div id="app">
  <p>{
   
   {message}}</p>
  <p v-pre>{
   
   {message}}</p>
</div>
<script>
  const app = new Vue({
     
     
    el:"#app",
    data:{
     
     
      message:"Hello Ting,I am Key!"
    }
  })
</script>
</body>
</html>

3. Operation results

insert image description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325718132&siteId=291194637