34 lines
469 B
JavaScript
34 lines
469 B
JavaScript
var component = {
|
|
data() {
|
|
return {status: 'Critical'};
|
|
},
|
|
template: '<p> Server status {{ status }} <button @click="changeStatus">XXX</button></p>',
|
|
methods: {
|
|
changeStatus(){
|
|
this.status = 'Normal';
|
|
}
|
|
}
|
|
};
|
|
|
|
var component2 = {
|
|
template: '<span>butts</span>',
|
|
};
|
|
|
|
|
|
|
|
var app1 = new Vue({
|
|
el: '#app1',
|
|
components: {
|
|
'ts-cmp': component
|
|
}
|
|
|
|
});
|
|
|
|
var app2 = new Vue({
|
|
el: '#app2',
|
|
components: {
|
|
'ts-cmp': component2
|
|
}
|
|
|
|
});
|