add.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" @clickLeft="back">
  4. <view class="rx-sc" @click="openSearch">
  5. <uni-easyinput prefixIcon="search" style="width: 420rpx" placeholder="请输入">
  6. </uni-easyinput>
  7. </view>
  8. <block slot="right">
  9. <button @click="openSearch" class="search_btn">搜索</button>
  10. </block>
  11. </uni-nav-bar>
  12. <view class="list_box">
  13. <u-list @scrolltolower="scrolltolower">
  14. <view v-for="(item,index) in 100" :key='index'>
  15. {{item}}
  16. </view>
  17. </u-list>
  18. </view>
  19. <view class="bottom-wrapper">
  20. <view class="btn_box"></view>
  21. </view>
  22. <u-popup v-if='show' :show="show" mode="top" @close="close">
  23. <view class="search_popup">
  24. </view>
  25. </u-popup>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. show: false,
  33. searchFrom: {
  34. keyWord: ''
  35. }
  36. }
  37. },
  38. methods: {
  39. openSearch() {
  40. this.show = true
  41. },
  42. close() {
  43. this.show = false
  44. },
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .content-box {
  50. height: 100vh;
  51. overflow: hidden;
  52. display: flex;
  53. flex-direction: column;
  54. background-color: $page-bg;
  55. }
  56. .search_btn {
  57. width: 120rpx;
  58. height: 70rpx;
  59. line-height: 70rpx;
  60. padding: 0 24rpx;
  61. background: $theme-color;
  62. font-size: 32rpx;
  63. color: #fff;
  64. margin: 0;
  65. }
  66. .list_box {
  67. flex: 1;
  68. overflow: hidden;
  69. padding: 4rpx 0;
  70. .u-list {
  71. height: 100% !important;
  72. }
  73. }
  74. .btn_box {
  75. width: 750rpx;
  76. height: 112rpx;
  77. background: #fff;
  78. }
  79. .search_popup {
  80. height: 70vh;
  81. }
  82. </style>