File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 17
17
<label >Cheese</label >
18
18
<input type =" checkbox" value =" cheese" v-model =" blog.categories" />
19
19
</div >
20
+ <label >Author:</label >
21
+ <select v-model =" blog.author" >
22
+ <option v-for =" author in authors" >{{ author }}</option >
23
+ </select >
20
24
</form >
21
25
<div id =" preview" >
22
26
<h3 >Preview blog</h3 >
27
31
<ul >
28
32
<li v-for =" category in blog.categories" >{{ category }}</li >
29
33
</ul >
34
+ <p >Author: {{ blog.author }}</p >
30
35
</div >
31
36
</div >
32
37
</template >
@@ -40,8 +45,10 @@ export default {
40
45
blog: {
41
46
title: ' ' ,
42
47
content: ' ' ,
43
- categories: []
44
- }
48
+ categories: [],
49
+ author: ' '
50
+ },
51
+ authors: [' The Net Ninja' , ' The Angular Avenger' , ' The Vue Vindicator' ]
45
52
}
46
53
},
47
54
methods: {
81
88
}
82
89
#checkboxes label {
83
90
display : inline-block ;
91
+ margin-top : 0 ;
84
92
}
85
93
</style >
You can’t perform that action at this time.
0 commit comments