computed Unused property msg1
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>
</head>
<body>
<div id="app">
{{msg}}
<p>{{msg1}}</p>
</div>
</body>
<script>
var vm = new Vue({
el:'#app',
data:{
msg:'Hello,Vue!'
},
watch:{
msg:function (newval,oldval) {
console.log('newval is ' + newval)
console.log('oldval is '+ oldval)
}
},
computed:{
: function() {
return 'computed:' + this.msg()
}
}
})
</script>
</html>我这样写,msg1它是灰色的,并没有高亮,然后浏览器里并没有出现 computed :Hello,Vue!
请问这问题怎么解决呢???????