1.watch写在Vue构造器内部
2.直接使用vm.$watch
app.$watch('temperature',function(newVal, oldVal){})
<!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">
<script src="./public/js/vue.js"></script>
<title>Watch options</title>
</head>
<body>
<div id="app">
<h1 id="h1">Watch options</h1>
<p>{
{temperature}}</p>
<p>{
{clothes}}</p>
<button @click="tempAdd">温度升高</button>
<button @click="tempReduce">温度降低</button>
</div>
<script type=&#