File tree 5 files changed +10227
-0
lines changed
5 files changed +10227
-0
lines changed Original file line number Diff line number Diff line change
1
+ body {
2
+ text-align : center;
3
+ }
4
+ p {
5
+ text-transform : capitalize;
6
+ }
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < title > Vue Tutorials</ title >
5
+ < link rel ="stylesheet " type ="text/css " href ="css/style.css ">
6
+ < script src ="js/vue.js "> </ script >
7
+ </ head >
8
+ < body >
9
+ < div id ="vue-app ">
10
+ < h2 > Refs</ h2 >
11
+ < input type ="text " ref ="input ">
12
+ < button @click ="readRefs "> Submit </ button >
13
+
14
+ < p > Your Fav Food: {{output}}</ p >
15
+
16
+ < div ref ='test '>
17
+ hello
18
+ </ div >
19
+
20
+ </ div >
21
+
22
+ < script src ="js/main.js "> </ script >
23
+ </ body >
24
+ </ html >
Original file line number Diff line number Diff line change
1
+ var vm = new Vue ( {
2
+
3
+ el : "#vue-app" ,
4
+ data :{
5
+ output : 'Your Fav Food' ,
6
+ } ,
7
+ methods :{
8
+ readRefs : function ( ) {
9
+ console . log ( this . $refs . innerText ) ;
10
+ this . output = this . $refs . input . value
11
+ }
12
+ }
13
+
14
+ } ) ;
You can’t perform that action at this time.
0 commit comments