|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
* ^6 Y+ I- a8 H2 x2 o
4 o6 Q w9 Z) p: W0 y& f: ^5 a3 Z+ j! q0 f
<!DOCTYPE html>
3 ]- c/ `; ~2 X, h<html lang="en">) b1 Z( i( e$ B$ \: A0 e) s% w: _
& U6 T- O J5 S) y<head>
$ M1 n% e2 ~5 ]: c. q; A <meta charset="UTF-8">- j) N/ W6 ~% ~) T5 n% H3 i6 n- W* u
<title>Event Bind</title>9 P7 d( f5 Q2 ~5 S. x1 k ~
<script src="./vue.js"></script>3 w! X4 v7 J9 }6 ]9 f
</head>
( `7 F/ s& n6 T6 b" v% [1 Y0 V, I$ J8 `- i+ b2 |
<body>+ ]; r5 f, _) Q( \6 I3 |( @ q# I0 z' A
<div id="root">4 `' k; q) z( f2 ~# {# j; {) K: L' Y
<div :title="title">Hello World</div>
9 Q7 y) E# B+ r2 z# |6 h, A# E8 G <!-- v-bind: is the same as : -->
+ ]0 R3 s( {; i/ G <!-- v-model -->5 H* t0 d- ?& q3 |
<input type="text" v-model="content" />
, V, [% r. g+ A% [' u" ^ <div>{{content}}</div>; Z5 \. c8 h5 ^
</div>4 M! w( f* G1 ^1 |
<script>
: ^: L% V6 a. h: u: y new Vue(! l) m) o4 m% V
{
/ V" G! C! _. w: N) z el: root,
p; e- x3 x- ?) A1 C$ _ F data: {
7 {" Z! O9 k0 f7 N. F4 ~ title: "this is hello world",
# @( f3 K# `" o, K( Z content: "this is content"$ Y( c1 ?/ e" `7 _- H3 t
},
, i4 F: s6 O! B methods: {
* K- o- M* v$ |4 C1 N% [7 u d& J: v; |1 c
}& o$ M" r! @3 \3 M- ?) E
}' [) A+ O. N6 S9 y( d
)
+ b1 n0 I J: P8 q+ G; a. U </script>5 h. f. p8 R" B2 ~$ ?; r8 a
</body>
- ?" b: u! `* u8 l k, n% ]: d5 O8 X3 k" y' O1 a
</html>. j: ^) i4 v) `( X, F5 W0 z7 O" E
% k* V$ L# q) f- G: F4 h
5 i) ?, O) e" N, w6 b6 e2 E |
|