App.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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: cover;
  32. background-attachment: fixed;
  33. .content {
  34. flex: 1 1 auto;
  35. margin: 0 30rpx;
  36. background: #fff;
  37. overflow-y: auto;
  38. /*
  39. * 移动端下当未设置高度时,flex:1 1 auto设置不生效,content不会有滚动条。
  40. * 导致uni-content出现滚动条,footer_text跟随页面滚动
  41. * 设置任意高度后content样式正常,显示滚动条,footer_text始终在底部。
  42. */
  43. height: 600rpx;
  44. }
  45. }
  46. * {
  47. box-sizing: border-box;
  48. }
  49. /* #endif */
  50. .example-info {
  51. font-size: 14px;
  52. color: #333;
  53. padding: 10px;
  54. }
  55. </style>