|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
4 x! L+ M5 c9 K. U+ v8 t
; w' Q8 h8 X, v; h2 J
$ r" i7 C5 f# Q9 E<!DOCTYPE html>
& m0 P. ^% `+ g/ }<html lang="en">
4 ]2 A2 ~+ A% U! f: D' V
7 }% f" R$ l- z" w3 U# e<head>. T, b1 X9 K/ P4 c0 |. o- {+ O
<meta charset="UTF-8">
* k F. r. j6 f/ ~ <title>Event Bind</title>, u5 [9 ~) u% J4 \- g4 V3 e0 H5 o
<script src="./vue.js"></script>( n4 z9 k# t3 j: u( v6 L
</head>( p1 G2 J. g, {
) b" L8 u0 K9 M1 c+ `$ @& q
<body>7 c7 @$ n3 d: `$ Q9 V P/ Z4 c
<div id="root">' T+ v: L( c5 V9 ?3 l! f( P
<div :title="title">Hello World</div>; i6 l1 u. j! S+ f: g
<!-- v-bind: is the same as : -->
' y9 L9 }& L$ [+ e P8 r <!-- v-model -->. P+ Y" K% G2 f4 a& L* u" L" a4 O
<input type="text" v-model="content" />0 S) L$ u5 \$ N: M: |
<div>{{content}}</div>
7 F2 z1 X& ~. J. ~ M, J </div>9 Q6 z8 K% t5 ]/ Z; T* W
<script>" } h M' _, p! j3 h4 J) z
new Vue(
. I! C1 j# w/ Q0 \5 |7 l {
4 u9 w: h! V" J$ ]/ l8 Y4 h2 @2 S el: root,
9 ]) t- h( ]6 e1 s data: {
$ A8 Q/ t- \. }) k; s title: "this is hello world",; i* a; ?" z2 U- K
content: "this is content"
+ M' C1 \- ` z; Z6 u },' o9 d. H- V, d! j
methods: {
5 A% F, R9 F& Y2 j' J, V. `
( S3 w: t( q0 i# U }
% e% j3 O5 ]- o/ v$ w }
" p* a4 a" p `$ J! A ), g: W* |' _0 R! }
</script>
% u3 P$ }* s( {' f. L6 r& a. Q</body>
" g$ c, O. t, W9 V j4 w6 i9 x1 | c% c3 e( I# h7 E6 z
</html>
2 B+ e2 f# b; e- K
: u+ F- d+ f% K6 {: l
2 ]& }) j! T& N |
|