<!DOCTYPE html>
<html>
<head>
<script src="http://192.168.1.22:8098"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body style="font-size: 30px">
<div id="app" class="static" v-bind:class="classObject">Test</div>
<script>
var vm=new Vue({
el:'#app',
data:{
isActive:true,
error:null
},
computed:{
classObject:function() {
return {
active: this.isActive && !this.error,
'text-danger': this.error && this.error.type === 'fatal'
}
}
}
});
</script>
</body>
</html>