|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
, `' d& @# w" u* V; I; M, @
5 \, S- P4 `9 d& ]! A8 y/ e- H5 @# N ]9 J. r
<!DOCTYPE html>5 V9 V- N( W+ Z/ \* p
<html lang="en">* R) e% i+ [5 {
+ m q- F7 q7 ^$ i1 Q
<head>4 N% F3 K0 S9 V8 n1 K- |
<meta charset="UTF-8">8 q. b7 ]2 w& `
<title>Event Bind</title>
# i3 d: y) {4 h0 q4 { <script src="./vue.js"></script>! H9 t% E, E$ |0 a
</head>+ F* [$ n6 ]- ~) L2 ?" U M7 p2 D- k
$ o3 X& A7 c& ^/ h4 T<body>1 u" E( S; h4 \6 I; S
<div id="root">; T% Q% N; ^7 f
<div :title="title">Hello World</div>! C$ ] V8 R: V0 B
<!-- v-bind: is the same as : -->
% A }6 Q9 z5 Y# j' |5 b6 | <!-- v-model -->, h/ O+ x# L& W" Q) s( s
<input type="text" v-model="content" />/ Y. \/ a1 \6 A8 w1 ]+ E S
<div>{{content}}</div>
s. ?+ ^3 }9 r9 M </div>
! i- G. Z. U0 e <script>6 U- M9 s0 b% u$ ^" l9 g4 A3 @
new Vue(
- T) t9 ^/ \1 r- ^! c3 ]4 H- a1 j {1 T# e! Y& x8 k4 ]$ S7 t; o
el: root,# C3 Q' m' C4 N" A
data: {
! l1 X5 Y, _+ k1 U) `* U* H. Q title: "this is hello world",
R, D' ]* v- E, M2 y1 {- A. ] content: "this is content"
# A5 L" X% z! c9 Q5 \- H },* c( i9 f* |# K, G; p5 u
methods: {
# h/ r! o: B1 _0 t& ~ {1 r& H2 E
}+ ~+ A) I5 G" _" Y
}
: O$ V: Z3 u+ P9 i )+ k! a$ I/ R4 }5 S
</script>
- M R, x; ^0 `4 G$ Z* J+ U& }</body>
) E* j* z' s9 I2 l3 o% E
, y1 G$ X' d, W( v</html>
. Z5 B) G9 {' k( x; P# m
# j6 x( u0 c2 Z2 K2 Y- d+ w$ f' q' F( |* e3 X7 q. p: O6 Q7 y- I
|
|