DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="huyiwei">
<meta name="generator" content="HBuilder X">
<title>模块语法笔记title>
<script type="text/javascript" src="../../lib/vue.js">script>
head>
<body>
<div id="app">
{{msg}}
<p>Using mustaches: {{ rawHtml }}p>
<p>Using v-html directive: <span v-html="rawHtml">span>p>
<p v-html="rawHtml">p>
<div v-bind:class="color">test...div>
<p>{{ number + 1 }}p>
<p>{{ ok ? 'YES' : 'NO' }}p>
<p>{{ message.split('').reverse().join('') }}p>
div>
<script type="text/javascript">
var vm = new Vue({
el:"#app",
data:{
msg : "hello vue!",
rawHtml:'this is should be red',
color:'blue',
number:10,
ok:false,
message:"vue"
}
});
vm.msg = "hi.....";
script>
<style type="text/css">
.red{
color:red;
}
.blue{
color:blue;
font-size: 100px;
}
style>
body>
html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50