<template>
	<fuiInput :focus="state.focusState" @focus="inputFocusFun">
		<template #left>
			<up-icon name="search" color="#2979ff" size="28" style="margin-right: 8rpx;"></up-icon>
		</template>
	</fuiInput>
</template>

<script lang="ts" setup>
	import { reactive, ref, defineEmits, defineProps, computed, watch } from 'vue';
	import fuiInput from '../fui-input/fui-input.vue'
	import i18n from '../../locale/index'
	import { useI18n } from 'vue-i18n'
	const getI18n = useI18n()
	const { t, locale } = getI18n
	const props = defineProps({
		icon:{
			type:String,
			default: ''
		}
	})
	const state = reactive({
		focusState: true
	})
	const inputFocusFun = (e:any) => {
		
		uni.onKeyboardHeightChange(res => {
		  console.log(res.height)
			if(res.height > 0){
				uni.hideKeyboard()
			}
		})
	}
</script>

<style scoped lang="scss">
.fui-input__wrap{
	padding: 0 !important;
}
</style>