App.vue 1.2 KB

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