App.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <script>
  2. export default {
  3. globalData: {
  4. version: '' // 当前版本号
  5. },
  6. onLaunch: function() {
  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. @import "uview-ui/index.scss";
  19. /*每个页面公共css */
  20. @import "./static/iconfont/iconfont.css";
  21. page{
  22. background: #fff;
  23. }
  24. .p-content{
  25. height: 100vh;
  26. display: flex;
  27. flex-direction: column;
  28. }
  29. /* felx布局 */
  30. .flex{
  31. display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */
  32. display: -moz-flex; /* Firefox 18+ */
  33. display: -ms-flexbox; /* IE 10 */
  34. display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
  35. }
  36. /*伸缩流方向*/
  37. .flex_column{
  38. -webkit-box-orient: vertical;
  39. -ms-flex-direction: column;
  40. -webkit-flex-direction: column;
  41. flex-direction: column;
  42. }
  43. /*主轴对齐*/
  44. .justify_center{
  45. -webkit-box-pack: center;
  46. -ms-flex-pack: center;
  47. -webkit-justify-content: center;
  48. justify-content: center;
  49. }
  50. .justify_end{
  51. -webkit-box-pack: end;
  52. -ms-flex-pack: end;
  53. -webkit-justify-content: flex-end;
  54. justify-content: flex-end;
  55. }
  56. .justify_between{
  57. -webkit-box-pack: justify;
  58. -ms-flex-pack: justify;
  59. -webkit-justify-content: space-between;
  60. justify-content: space-between;
  61. }
  62. /*侧轴对齐*/
  63. .align_start{
  64. -webkit-box-align: start;
  65. -ms-flex-align: start;
  66. -webkit-align-items: flex-start;
  67. align-items: flex-start;
  68. }
  69. .align_end{
  70. -webkit-box-align: end;
  71. -ms-flex-align: end;
  72. -webkit-align-items: flex-end;
  73. align-items: flex-end;
  74. }
  75. .align_center{
  76. -webkit-box-align: center;
  77. -ms-flex-align: center;
  78. -webkit-align-items: center;
  79. align-items: center;
  80. }
  81. .align_baseline{
  82. -webkit-box-align: baseline;
  83. -ms-flex-align: baseline;
  84. -webkit-align-items: baseline;
  85. align-items: baseline;
  86. }
  87. /*伸缩性*/
  88. .flex_auto{
  89. -webkit-box-flex: 1;
  90. -ms-flex: auto;
  91. -webkit-flex: auto;
  92. flex: auto;
  93. }
  94. .flex_1{
  95. -webkit-box-flex: 1;
  96. -ms-flex: 1;
  97. -webkit-flex: 1;
  98. flex: 1;
  99. }
  100. // ios15原生input的type=search时会默认自带搜索图标。
  101. // 在全局的公共样式隐藏ios自带搜索图标即可
  102. [type="search"]::-webkit-search-decoration {
  103. display: none;
  104. }
  105. uni-toast {
  106. z-index: 1000000;
  107. }
  108. </style>