APP.vue
methods: {
bodyScale() {
let devicewidth = document.documentElement.clientWidth //获取当前分辨率下的可是区域宽度
let scale = devicewidth / 1920 // 分母——设计稿的尺寸
document.body.style.zoom = scale //放大缩小相应倍数
}
},
mounted() {
const _this = this;
this.bodyScale();
window.onresize = function() {
_this.bodyScale();
}.bind(this);
}