vue 改变当前页面的背景色

vue 改变当前页面的背景色,在当前页面的JS文件里面增加下面代码 (页面背景色会变成#f7f7f7)

beforeCreate() {
            document
                .querySelector('body')
                .setAttribute('style', 'background-color:#f7f7f7')
        },

猜你喜欢

转载自blog.csdn.net/xff_xiaofanfan/article/details/106664122