<!DOCTYPE?html>
<html>
????<head>
????????<meta?charset="UTF-8">
????????<title>vue插值</title>
????????<script?src="vue.js"?type="text/javascript"?charset="utf-8"></script>
????????<meta?name="viewport"?content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"?/>
????????<style?type="text/css">
????????????.lili-xiaoman?{
????????????????color:?red;
????????????}
????????</style>
????</head>
????<body>
????????<div?class="test">
????????????<p>{{message}}</p>?<!--這個(gè)值可以實(shí)時(shí)響應(yīng)-->
????????????<p>{{*message}}</p>?<!--單次插值,今后的數(shù)據(jù)變化就不會(huì)再引起插值更新了,例如在控制臺(tái)寫入:myVue.message=123-->
????????????<p?class="lili-{{message}}">雙括號(hào)標(biāo)簽也可以用在屬性上</p>
????????</div>
????????<script?type="text/javascript">
????????????var?myVue?=?new?Vue({
????????????????el:?".test",
????????????????data:?{
????????????????????message:"xiaoman"
????????????????}
????????????})
????????</script>
????</body>
</html>
vue中 的{{*message}}阻止綁定了嗎?為什么我的{{*message}}綁定報(bào)錯(cuò)?
qq_眉黛青山_0
2017-07-10 19:10:07