跟03-class样式差不了多少
<script>
var obj = {
data() {
return {
styleObj: {
backgroundColor: 'pink',
fontSize: '24px'
},
styleArary: {
backgroundColor: 'green'
},
styleColor: {
color: '#fff'
}
}
},
methods: {
},
}
var app = Vue.createApp(obj).mount("#box")
</script>
运行结果: