<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue js</title>
</head>
<body>
    <div id="app">
        <h1>{{message}}</h1>
        <input type="text" v-model="message">
        <pre>
{{$data | json}}
        </pre>
        <form action="">
            <div class="errror" v-if="!message">You must enter a message to submit</div>
            <textarea name="" id="" cols="30" rows="10" v-model='message'></textarea>
            <button v-show="message">Send message</button>
        </form>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <script>
      new Vue({
         el:'#app',
         data:{
            message:"Hello World!"
         }    
      })
    </script>
</body>
</html>
v-model:使内容与data中的内容一致
v-show:可根据条件进行显示
v-if:与v-show类似
el:'#app'  //绑定id为app的div区域