-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue_1.js
More file actions
44 lines (43 loc) · 1011 Bytes
/
vue_1.js
File metadata and controls
44 lines (43 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$(function () {
// Vue.component('my-component', {
// template: '<div>A custom component!</div>'
// });
// var Child = {
// template: '<div>A custom component1!</div>'
// };
// var data = { counter: 0 };
// Vue.component('simple-counter', {
// el:function(){
// return '#example'
// },
// template: '<button v-on:click="counter += 1">{{ counter }}</button>',
// data: function () {
// return data
// }
//
// });
// var vm = new Vue({
// el: '#example',
// components: {
// 'my-component1': Child
// }
// });
// var newvm=new Vue({
// el:'#example1'
// });
//
//
// new Vue({
// el: '#example-2'
// });
Vue.component('child', {
props: ['myMessage'],
template: '<span>{{ myMessage }}</span>'
})
new Vue({
el:'#example',
data:{
parentMsg:''
}
})
});