Skip to content

Commit

Permalink
🎨 属性绑定和双向数据绑定
Browse files Browse the repository at this point in the history
  • Loading branch information
yongyu committed Sep 27, 2018
1 parent 441a34b commit 57e2270
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@

<div id="root">
<h1 v-text="content" @click="handleClick"></h1>
<div v-html="html"></div>
<div :title="title" v-html="html"></div>
<input type="text" v-model="text"/>
<div>{{text}}</div>
</div>

<script>
new Vue({
el: "#root",
data: {
content: "hello",
html: "<h1>Vue</h1>"
title: "this is Vue",
html: "<h1>Vue</h1>",
text: "this is text"
},
methods: {
handleClick: function () {
Expand Down

0 comments on commit 57e2270

Please sign in to comment.