Vue改class与css样式

2018-12-25  本文已影响0人  錦魚
new Vue({
    el: '#demo',
    data: {
        a: 'aClass',
        isA: true,
        isB: false,
        activeColor: 'red',
        fontSize: 20
    },
    // 函数方法保存
    methods: {
        update(){
            this.a = 'bClass';
            this.isA = false;
            this.isB = true;
            this.activeColor = 'green';
            this.fontSize = 30;
        }
    }
})
上一篇 下一篇

猜你喜欢

热点阅读