App.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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: relative;
  31. // padding-bottom: 50px;
  32. min-height: 100vh;
  33. display: flex;
  34. flex-direction: column;
  35. background: url("./static/index/bg.png") no-repeat center;
  36. background-size: 100% 100%;
  37. .content {
  38. flex: 1 1 auto;
  39. margin: 0 30rpx;
  40. background: #fff;
  41. overflow-y: auto;
  42. /*
  43. * 移动端下当未设置高度时,flex:1 1 auto设置不生效,content不会有滚动条。
  44. * 导致uni-content出现滚动条,footer_text跟随页面滚动
  45. * 设置任意高度后content样式正常,显示滚动条,footer_text始终在底部。
  46. */
  47. height: 600rpx;
  48. }
  49. }
  50. * {
  51. box-sizing: border-box;
  52. }
  53. /* #endif */
  54. .example-info {
  55. font-size: 14px;
  56. color: #333;
  57. padding: 10px;
  58. }
  59. </style>