App.vue 969 B

1234567891011121314151617181920212223242526272829303132
  1. <!--
  2. * @Author: your name
  3. * @Date: 2020-10-21 18:14:35
  4. * @LastEditTime: 2021-04-19 10:12:15
  5. * @LastEditors: zwy
  6. * @Description: In User Settings Edit
  7. * @FilePath: \vue-manage-system-master\src\App.vue
  8. -->
  9. <template>
  10. <div id="app">
  11. <div id="container"></div>
  12. <router-view></router-view>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. name: 'App',
  18. created() {
  19. // 获取滚动条的满宽度和高度
  20. const $dom = document.createElement('div');
  21. $dom.setAttribute('style', 'width: 100px; height:100px;overflow:scroll;position:absolute;top: -200px; left: -200px');
  22. document.body.appendChild($dom);
  23. window.scrollBarWidth = $dom.offsetWidth - $dom.clientWidth;
  24. window.scrollBarHeight = $dom.offsetHeight - $dom.clientHeight;
  25. document.body.removeChild($dom);
  26. }
  27. };
  28. </script>
  29. <style>
  30. @import './assets/css/main.scss';
  31. @import './assets/css/color-dark.css'; /*深色主题*/
  32. </style>