|
2 | 2 | <div>
|
3 | 3 | <div id="content">
|
4 | 4 | <h3>Playlists</h3>
|
| 5 | +{{ channelName }} AND {{ name }} |
5 | 6 | <ul>
|
6 |
| - <li v-for="playlist in playlists"> |
| 7 | + <li v-for="playlist in myplaylist"> |
7 | 8 | <a v-bind:href="playlist.githublink" v-bind:title="playlist.title" target="_blank">
|
8 | 9 | {{ playlist.name }}
|
9 | 10 | </a>
|
10 | 11 | </li>
|
11 | 12 | </ul>
|
| 13 | + |
| 14 | + <h2>Student List</h2> |
| 15 | + <ul> |
| 16 | + <li v-for="student in students">{{ student }}</li> |
| 17 | + </ul> |
| 18 | + <button v-on:click="deleteStudent">Delete Student</button> |
| 19 | + |
| 20 | + <h3>Simple message: {{ simpleMessage }}</h3> |
| 21 | + |
| 22 | + {{ call1() }} |
12 | 23 | </div>
|
13 | 24 | </div>
|
14 | 25 | </template>
|
15 | 26 |
|
16 | 27 | <script>
|
17 | 28 | export default {
|
18 |
| -
|
| 29 | + /*props:["name","myplaylist","channelName"],*/ |
| 30 | + props:{ |
| 31 | + simpleMessage:{ |
| 32 | + type: String |
| 33 | + }, |
| 34 | + students:{ |
| 35 | + type: Array |
| 36 | + }, |
| 37 | + name:{ |
| 38 | + type: String, |
| 39 | + default: "Default name" |
| 40 | + }, |
| 41 | + myplaylist:{ |
| 42 | + type: Array |
| 43 | + }, |
| 44 | + channelName:{ |
| 45 | + type: String |
| 46 | + }, |
| 47 | + author:{ |
| 48 | + type:Object |
| 49 | + }, |
| 50 | + isLearning:{ |
| 51 | + type: Boolean |
| 52 | + } |
| 53 | + }, |
19 | 54 | data () {
|
20 | 55 | return {
|
21 |
| - playlists:[ |
22 |
| - { |
23 |
| - name:"Wordpress Plugin Development", |
24 |
| - githublink:"https://github.com/owthub/wordpress-plugin", |
25 |
| - title:"Wordpress Plugin Development" |
26 |
| - }, |
27 |
| - { |
28 |
| - name:"Wordpress Theme Development", |
29 |
| - githublink:"https://github.com/owthub/wordpress-theme", |
30 |
| - title:"Wordpress Theme Development" |
31 |
| - }, |
32 |
| - { |
33 |
| - name:"Vue Js2 Development", |
34 |
| - githublink:"https://github.com/owthub/vuejs2", |
35 |
| - title:"Vue Js2 Development" |
36 |
| - }, |
37 |
| - { |
38 |
| - name:"WP JSON Rest API Development", |
39 |
| - githublink:"https://github.com/owthub/wordpress-json-rest-api", |
40 |
| - title:"WP JSON Rest API Development" |
41 |
| - }, |
42 |
| - { |
43 |
| - name:"WP JSON Rest API Development", |
44 |
| - githublink:"https://github.com/owthub/wordpress-json-rest-api", |
45 |
| - title:"WP JSON Rest API Development" |
46 |
| - } |
47 |
| - ] |
| 56 | + message:"This is simple message" |
| 57 | + } |
| 58 | + }, |
| 59 | + methods:{ |
| 60 | + call1: function(){ |
| 61 | + console.log(this.channelName); |
| 62 | + }, |
| 63 | + deleteStudent:function(){ |
| 64 | + this.students.pop(); |
48 | 65 | }
|
49 | 66 | }
|
50 | 67 | }
|
|
0 commit comments