|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
8 M0 ?0 a; M, `6 N
, a/ P; H1 H+ X+ Q7 P8 n0 X( s# C9 v$ n# P' W2 }
<!DOCTYPE html>% b: A: m, W) d) B
<html lang="en">7 e6 Q$ v9 J4 s$ l$ l" M
* u/ c. ^4 @2 n& j
<head>3 [+ _; v5 ?" U8 z& G4 V
<meta charset="UTF-8">" U: P' B; P- ?) f; h
<title>Event Bind</title>
! `8 x# [1 _! u2 K <script src="./vue.js"></script>3 O- q9 `* {, n# X
</head># U" {/ R6 g+ J$ Z8 R8 u1 p1 I
# C- r* I6 A7 k* A4 |
<body>7 ^& I/ a0 o" b! r) z/ O' ~" M' J' |7 o
<div id="root">& h1 u& m! A' l' `; ]8 E/ H& c
<div :title="title">Hello World</div>( B6 q$ {/ F3 b3 h
<!-- v-bind: is the same as : -->
. W5 T% Y& v8 Y! C# ^ <!-- v-model --> x/ E- z& j( x! N# ~1 Q$ m
<input type="text" v-model="content" />
; l: R* V7 J, w) f. m <div>{{content}}</div>
% o! D2 L! K: {: ]3 o7 z </div>. f1 p( Z q6 A% y9 g3 w& F
<script>4 [" }6 K9 T- r0 Z% t* H4 M8 a
new Vue(5 T$ L( _7 k! h1 P7 O* C
{
4 F# N$ a' }" q- z5 m% M el: root,8 z) u- v5 ^8 _( ^$ T( U
data: {
# \/ {& U2 u9 F7 V/ A" |1 v0 K8 z X3 a( D title: "this is hello world",
/ d: K. D0 M. P' y# b content: "this is content"
; S- P4 Y8 d& x# U2 |* t },- y; c7 M6 @5 W- q/ |* B5 D
methods: {2 J2 T8 K# u. X, }& t. `- T* u3 U% N
2 n/ H5 K" X/ E& A }
) p, O+ C% z3 A! T& { }8 ?; Y3 `8 W% _ E* M/ t$ Y4 b
)* _, a: D+ _$ w& ^) C7 J
</script>
! ~. e* w0 t6 @( a3 W& F( n- B7 l A ?</body>1 N6 t. y6 k; C) r- n( o& l# u
3 d# y9 P% t& l9 j* [( U& H; Z
</html>
5 d* d$ R& B4 K: e4 \3 {3 A8 i' J0 D; t9 y S9 A4 s5 N/ J* X
: V0 S: R$ K' X' c& j |
|