File tree 11 files changed +403
-4
lines changed
11 files changed +403
-4
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div id =" app" class =" demo" >
3
+ {{ message }}
4
+ </div >
5
+ </template >
6
+
7
+ <script >
8
+ export default {
9
+ data () {
10
+ return {
11
+ message: ' Hello Vue!'
12
+ }
13
+ },
14
+ }
15
+ </script >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div id =" app-2" class =" demo" >
3
+ <span v-bind:title =" message" >
4
+ Hover your mouse over me for a few seconds to see my dynamically bound title!
5
+ </span >
6
+ </div >
7
+ </template >
8
+
9
+ <script >
10
+ export default {
11
+ data () {
12
+ return {
13
+ message: ' You loaded this page on ' + new Date ().toLocaleString ()
14
+ }
15
+ },
16
+ }
17
+ </script >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div id =" app-3" class =" demo" >
3
+ <span v-if =" seen" >Now you see me</span >
4
+ </div >
5
+ </template >
6
+
7
+ <script >
8
+ export default {
9
+ data () {
10
+ return {
11
+ seen: true
12
+ }
13
+ },
14
+ }
15
+ </script >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div id =" app-4" class =" demo" >
3
+ <ol >
4
+ <li v-for =" todo in todos" >
5
+ {{ todo.text }}
6
+ </li >
7
+ </ol >
8
+ </div >
9
+ </template >
10
+
11
+ <script >
12
+ export default {
13
+ data () {
14
+ return {
15
+ todos: [
16
+ { text: ' Learn JavaScript' },
17
+ { text: ' Learn Vue' },
18
+ { text: ' Build something awesome' }
19
+ ]
20
+ }
21
+ },
22
+ }
23
+ </script >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div id =" app-5" class =" demo" >
3
+ <p >{{ message }}</p >
4
+ <button v-on:click =" reverseMessage" >Reverse Message</button >
5
+ </div >
6
+ </template >
7
+
8
+ <script >
9
+ export default {
10
+ data () {
11
+ return {
12
+ message: ' Hello Vue.js!'
13
+ }
14
+ },
15
+ methods: {
16
+ reverseMessage : function () {
17
+ this .message = this .message .split (' ' ).reverse ().join (' ' )
18
+ }
19
+ }
20
+ }
21
+ </script >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div id =" app-6" class =" demo" >
3
+ <p >{{ message }}</p >
4
+ <input v-model =" message" >
5
+ </div >
6
+ </template >
7
+
8
+ <script >
9
+ export default {
10
+ data () {
11
+ return {
12
+ message: ' Hello Vue!'
13
+ }
14
+ },
15
+ }
16
+ </script >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div id =" app-7" class =" demo" >
3
+ <ol >
4
+ <todo-item v-for =" item in groceryList" v-bind:todo =" item" :key =" item.id" ></todo-item >
5
+ </ol >
6
+ </div >
7
+ </template >
8
+
9
+ <script >
10
+ import Vue from ' vue/dist/vue.js'
11
+ export default {
12
+ data () {
13
+ return {
14
+ groceryList: [
15
+ { id: 0 , text: ' Vegetables' },
16
+ { id: 1 , text: ' Cheese' },
17
+ { id: 2 , text: ' Whatever else humans are supposed to eat' }
18
+ ]
19
+ }
20
+ },
21
+ components: {
22
+ ' todo-item' : Vue .component (' todo-item' , {
23
+ props: [' todo' ],
24
+ template: ' <li>{{ todo.text }}</li>'
25
+ })
26
+ }
27
+ }
28
+ </script >
Original file line number Diff line number Diff line change
1
+ .theme-default-content :not (.custom ) {
2
+ max-width 960px
3
+ }
4
+
5
+ .demo {
6
+ font-family : sans-serif ;
7
+ border : 1px solid #e e e ;
8
+ border-radius : 2px ;
9
+ padding : 20px 30px ;
10
+ margin-top : 1em ;
11
+ margin-bottom : 40px ;
12
+ user-select : none ;
13
+ overflow-x : auto ;
14
+ }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ heroImage: /logo.png
4
4
heroText : Vue.js
5
5
tagline : The Progressive JavaScript Framework
6
6
actionText : Get Started →
7
- actionLink : /docs/
7
+ actionLink : /guide/introduction
8
8
features :
9
9
- title : Approachable
10
10
details : Already know HTML, CSS and JavaScript? Read the guide and start building things in no time!
You can’t perform that action at this time.
0 commit comments