App.vue 934 B

12345678910111213141516171819202122232425262728293031
  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. <router-view></router-view>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'App',
  17. created() {
  18. // 获取滚动条的满宽度和高度
  19. const $dom = document.createElement('div');
  20. $dom.setAttribute('style', 'width: 100px; height:100px;overflow:scroll;position:absolute;top: -200px; left: -200px');
  21. document.body.appendChild($dom);
  22. window.scrollBarWidth = $dom.offsetWidth - $dom.clientWidth;
  23. window.scrollBarHeight = $dom.offsetHeight - $dom.clientHeight;
  24. document.body.removeChild($dom);
  25. }
  26. };
  27. </script>
  28. <style>
  29. @import './assets/css/main.scss';
  30. @import './assets/css/color-dark.css'; /*深色主题*/
  31. </style>