App.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div id="app">
  3. <router-view/>
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'app',
  9. data () {
  10. return {
  11. }
  12. },
  13. methods:{
  14. bodyScale() {
  15. // var ua = navigator.userAgent.toLocaleLowerCase();
  16. // if (ua.match(/chrome/) != null) {
  17. // var is360 = this._mime("type", "application/vnd.chromium.remoting-viewer");
  18. // console.log(is360)
  19. // if (!is360) {
  20. // }
  21. // }
  22. var devicewidth = document.documentElement.clientWidth;//获取当前分辨率下的可是区域宽度
  23. var scale = devicewidth / 1920; // 分母——设计稿的尺寸
  24. document.body.style.zoom = scale;//放大缩小相应倍数
  25. document.body.style.transform='scale(' + scale + ')'
  26. document.body.style.transformOrigin="center top"
  27. console.log(document.body.style.zoom)
  28. // document.write('<link rel="stylesheet" href="./assets/css/index.css">')
  29. },
  30. _mime(option, value) {
  31. var mimeTypes = navigator.mimeTypes;
  32. for (var mt in mimeTypes) {
  33. if (mimeTypes[mt][option] == value) {
  34. return true;
  35. }
  36. }
  37. return false;
  38. }
  39. },
  40. created() {
  41. // this.bodyScale()
  42. }
  43. }
  44. </script>
  45. <style>
  46. /*主样式*/
  47. @import './assets/css/index.css';
  48. @import './assets/css/scroll.css';
  49. @import './assets/css/element.css';
  50. @import './assets/css/iview.css';
  51. @import './assets/css/animate.min.css';
  52. @import './assets/css/screen.css';
  53. @import './assets/css/leftMenu.css';
  54. #app {
  55. /* font-family: 'Avenir', Helvetica, Arial, sans-serif;
  56. -webkit-font-smoothing: antialiased;
  57. -moz-osx-font-smoothing: grayscale;
  58. text-align: center;
  59. color: #2c3e50;
  60. margin-top: 60px;*/
  61. width: 100%;
  62. height: 100%;
  63. }
  64. body .el-table th.gutter {
  65. display: table-cell !important;
  66. }
  67. body .el-table colgroup.gutter {
  68. display: table-cell !important;
  69. }
  70. </style>