App.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <script>
  2. export default {
  3. onLaunch: function () {
  4. console.warn(
  5. "当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!"
  6. );
  7. console.log("App Launch");
  8. },
  9. onShow: function () {
  10. console.log("App Show");
  11. },
  12. onHide: function () {
  13. console.log("App Hide");
  14. },
  15. };
  16. </script>
  17. <style lang="scss">
  18. /*每个页面公共css */
  19. @import "@/uni_modules/uni-scss/index.scss";
  20. /* #ifndef APP-NVUE */
  21. @import "@/static/customicons.css";
  22. // 设置整个项目的背景色
  23. @font-face {
  24. font-family: "dataMeter";
  25. src: url("static/fonts/dataMeter.ttf");
  26. font-weight: normal;
  27. font-style: normal;
  28. }
  29. .page {
  30. position: fixed;
  31. // padding-bottom: 50px;
  32. min-height: 100vh;
  33. width: 100%;
  34. display: flex;
  35. flex-direction: column;
  36. background: url("./static/index/bg.png") no-repeat center;
  37. background-size: 100% 100%;
  38. .content {
  39. flex: 1 1 auto;
  40. margin: 0 30rpx;
  41. background: #fff;
  42. overflow-y: auto;
  43. /*
  44. * 移动端下当未设置高度时,flex:1 1 auto设置不生效,content不会有滚动条。
  45. * 导致uni-content出现滚动条,footer_text跟随页面滚动
  46. * 设置任意高度后content样式正常,显示滚动条,footer_text始终在底部。
  47. */
  48. height: 600rpx;
  49. }
  50. }
  51. * {
  52. box-sizing: border-box;
  53. }
  54. /* #endif */
  55. .example-info {
  56. font-size: 14px;
  57. color: #333;
  58. padding: 10px;
  59. }
  60. </style>