获取屏幕宽高的简单方式之一


mounted() {
let w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
let h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
this.$refs.subject.style.height = h + 'px';
this.$refs.rightAnswer.style.height = h + 'px';
this.$refs.sc.style.height = h + 'px';
}

vue里用let 相当于var


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM