File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 13
13
A propriedade v-on:input é usada quando queremos capturar o que o usuário está digitando
14
14
-->
15
15
< input type ="text " v-on:input ="changeTitle ">
16
- < p > {{title}}</ p >
16
+ < p > Acesso ao atributo: {{ title }}</ p >
17
+ < p > Chamando através de um método: {{ sayHello() }}</ p >
17
18
</ div >
18
19
19
20
< script src ="../js/vue.js "> </ script >
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
+ < title > VueJS</ title >
7
+ < link rel ="stylesheet " href ="">
8
+ < script src ="vue.js "> </ script >
9
+ </ head >
10
+ < body >
11
+ < div id ="app ">
12
+ <!--
13
+ A propriedade v-bind é usada quando queremos indicar ao html que deve ser
14
+ interpretado um atributo definido no js que contém o código vue da página
15
+ -->
16
+ < a v-bind:href ="link " target ="_blank "> Google</ a >
17
+ </ div >
18
+
19
+ < script src ="../js/vue.js "> </ script >
20
+ < script src ="../js/exemplo3.js "> </ script >
21
+ </ body >
22
+ </ html >
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ new Vue({
6
6
methods : {
7
7
changeTitle : function ( event ) {
8
8
this . title = event . target . value ;
9
+ } ,
10
+ sayHello : function ( ) {
11
+ return this . title ;
9
12
}
10
13
}
11
14
} ) ;
Original file line number Diff line number Diff line change
1
+ new Vue ( {
2
+ el : '#app' ,
3
+ data :{
4
+ link : 'http://google.com'
5
+ }
6
+ } ) ;
You can’t perform that action at this time.
0 commit comments