generated from ccsens_fe/uni-vue3-template
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.3 KiB
50 lines
1.3 KiB
<template>
|
|
<view class="search-wrap">
|
|
<view class="bg-main-v border-radius-9-up u-p-r-40 flex ">
|
|
<image class="icon-car" src="@/static/images/car.png" mode="aspectFill" />
|
|
<text class="font-bold text-white">{{ carNo }}</text>
|
|
</view>
|
|
<view class="bg-white border-radius-9-down u-p-l-40 u-p-r-40 u-p-t-20 u-p-b-20">
|
|
<uni-easyinput class="search-circle" v-model="searchValue" type="text" prefixIcon="search" :inputBorder="false" placeholder="搜索患者"
|
|
@confirm="onSearch" />
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed, ref, onMounted } from 'vue';
|
|
import { useServiceStore } from '@/store/modules/service';
|
|
|
|
const emits = defineEmits(['on-search', 'on-load'])
|
|
|
|
const serviceStore = useServiceStore()
|
|
const searchValue = ref('')
|
|
|
|
const carNo = computed(() => serviceStore.carNo)
|
|
|
|
function onSearch() {
|
|
emits('on-search', searchValue.value)
|
|
}
|
|
|
|
onMounted(() => {
|
|
//// #ifdef H5
|
|
const el = document.querySelector('.search-wrap') as HTMLElement
|
|
emits('on-load', el.offsetHeight)
|
|
// #endif
|
|
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.icon-car {
|
|
width: 48rpx;
|
|
height: 48rpx;
|
|
margin: 20rpx 20rpx 20rpx 40rpx;
|
|
}
|
|
|
|
.search-circle :deep(.uni-easyinput__content) {
|
|
background-color: #f5f5f8 !important;
|
|
border-radius: 35rpx;
|
|
|
|
}
|
|
</style>
|
|
|