index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="page" :style="{'height':(h-th)+'px'}">
  3. <u-navbar bgColor="transparent">
  4. <view class="u-nav-slot" slot="left" style="display: flex;" @tap="show=true">
  5. <text>{{name}}</text>
  6. <u-icon name="arrow-down" size="28" :bold="true" color="#fff"></u-icon>
  7. </view>
  8. </u-navbar>
  9. <view class="bg"></view>
  10. <Tabbar :tabbarIndex="0"></Tabbar>
  11. <u-picker :show="show" :columns="nameList" @close="show=false" @cancel="show=false" @confirm="confirm"></u-picker>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. name:'一家民宿',
  19. nameList:[['一家民宿','我家民宿','他家民宿']],
  20. show:false
  21. }
  22. },
  23. methods: {
  24. confirm(e){
  25. this.name = e.value[0];
  26. this.show = false;
  27. }
  28. }
  29. }
  30. </script>
  31. <style scoped lang="less">
  32. .page{
  33. background: #F3F4F4;
  34. padding-bottom: 40rpx;
  35. box-sizing: border-box;
  36. overflow-y: auto;
  37. .bg{
  38. width: 100%;
  39. height: 743rpx;
  40. background: url(https://i.ringzle.com/file/20240107/8bc656fc64fd4386a6b336a7dc8c86d0.png) no-repeat;
  41. background-size: 100% 100%;
  42. }
  43. }
  44. /deep/.u-nav-slot{
  45. &>text{
  46. font-size: 34rpx;
  47. font-family: PingFang SC, PingFang SC;
  48. font-weight: bold;
  49. color: #FFFFFF;
  50. }
  51. .u-icon{
  52. margin: 8rpx 0 0 20rpx;
  53. }
  54. }
  55. </style>