update vue.js synthax
This commit is contained in:
parent
372be64aa4
commit
f340041389
|
@ -1,4 +1,6 @@
|
||||||
const ppbut = {
|
|
||||||
|
|
||||||
|
Vue.component('ppbut' ,{
|
||||||
template : `
|
template : `
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
|
@ -48,14 +50,13 @@ const ppbut = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
new Vue({
|
|
||||||
el: '#root',
|
|
||||||
data: {
|
|
||||||
name: 'coco'
|
|
||||||
},
|
|
||||||
components: { ppbut }
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let vm = new Vue({
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
name: 'coco'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).$mount('#root')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue