App.vue 1015 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. console.log('App Launch')
  5. },
  6. onShow: function() {
  7. console.log('App Show')
  8. },
  9. onHide: function() {
  10. console.log('App Hide')
  11. }
  12. }
  13. </script>
  14. <style>
  15. /*每个页面公共css */
  16. </style>
  17. <style lang="scss">
  18. /*每个页面公共css */
  19. @import "@/uni_modules/uview-ui/index.scss";
  20. @import '@/common/adaptive.scss';
  21. /* 全局基础样式 */
  22. page {
  23. font-size: $base-font-size;
  24. line-height: 1.5;
  25. color: #333;
  26. background-color: #f5f5f5;
  27. }
  28. /* 去除默认边距 */
  29. view, text, navigator {
  30. margin: 0;
  31. padding: 0;
  32. box-sizing: border-box;
  33. }
  34. /* 统一字体大小响应 */
  35. @include respond-to('tablet') {
  36. page {
  37. font-size: 16px;
  38. }
  39. }
  40. @include respond-to('desktop') {
  41. page {
  42. font-size: 16px;
  43. }
  44. }
  45. /* 滚动条美化 */
  46. ::-webkit-scrollbar {
  47. width: 6px;
  48. height: 6px;
  49. }
  50. ::-webkit-scrollbar-track {
  51. background: #f5f5f5;
  52. }
  53. ::-webkit-scrollbar-thumb {
  54. background: #ccc;
  55. border-radius: 3px;
  56. }
  57. </style>