| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <view class="search">
- <picker style="width: 50%;" @change="bindPickerChange($event,1)" :value="typeIndex" :range="typeList">
- <view class="search-type">
- {{typeList[typeIndex]}}
- <div class="search-type-img">
- <img src="../static/bottom.png">
- </div>
- </view>
- </picker>
- <picker style="width: 50%;" @change="bindPickerChange($event,2)" :value="timeIndex" :range="timeList">
- <view class="search-time">
- {{timeList[timeIndex]}}
- <div class="search-time-img">
- <img src="../static/bottom.png">
- </div>
- </view>
- </picker>
- </view>
- </template>
- <script setup>
- import {
- ref
- } from "vue"
- defineProps({
- typeList: Array,
- timeList: Array
- })
- const typeIndex = ref(0)
- const timeIndex = ref(0)
- const conveyData = defineEmits(["handLeConveyData"])
- const bindPickerChange = (e, type) => {
- if (type === 1) {
- typeIndex.value = e.detail.value
- } else {
- timeIndex.value = e.detail.value
- }
- conveyData("handLeConveyData", {
- typeIndex: typeIndex.value,
- timeIndex: timeIndex.value,
- })
- }
- </script>
- <style lang="scss" scoped>
- .search {
- display: flex;
- justify-content: space-around;
- align-items: center;
- margin-bottom: 20rpx;
- height: 100rpx;
- font-size: 28rpx;
- background-color: #fff;
- .search-type {
- flex: 1;
- display: flex;
- justify-content: space-evenly;
- .search-type-img {
- margin-top: -5rpx;
- width: 17rpx;
- height: 12rpx;
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
- .search-time {
- flex: 1;
- display: flex;
- justify-content: space-evenly;
- .search-time-img {
- margin-top: -5rpx;
- width: 17rpx;
- height: 12rpx;
- img {
- width: 100%;
- height: 100%;
- }
- }
- }
- }
- </style>
|