File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change 9
9
</ head >
10
10
< body >
11
11
< div id ="app ">
12
- {{ nextYear('안녕') }}
13
- < input :type ="type " :value ="inputData ">
14
- < a :href ="getKossieCoderLink('kossiecoder') "> 코지 코더 채널</ a >
12
+ < form v-on:submit.prevent ="submit ">
13
+ < input type ="text "> < br >
14
+ < button type ="submit "> Submit</ button >
15
+ </ form >
15
16
</ div >
16
17
< script >
17
18
new Vue ( {
18
19
el : '#app' ,
19
20
data : {
20
- person : {
21
- name : '코지 코더' ,
22
- age : 34
23
- } ,
24
- inputData : 'hello' ,
25
- type : 'text' ,
26
- link : 'https://www.youtube.com/'
21
+ year : 2018
27
22
} ,
28
23
methods : {
29
- getKossieCoderLink ( channel ) {
30
- return this . link + channel ;
24
+ plus ( ) {
25
+ this . year ++ ;
31
26
} ,
32
- nextYear ( greeting ) {
33
- return greeting + '! ' + this . person . name + ' 는 내년에 ' + ( this . person . age + 1 ) + '살 입니다' ;
27
+ minus ( ) {
28
+ this . year -- ;
34
29
} ,
35
- otherMethod : function ( ) {
36
- this . nextYear ( ) ;
30
+ submit ( ) {
31
+ alert ( 'submitted' ) ;
32
+ console . log ( 'hello' ) ;
37
33
}
38
34
}
39
35
} )
You can’t perform that action at this time.
0 commit comments