<template>
  <view>
    <view class="house_header">
      <up-search :showAction="false" v-model="useModel.formData.value.name" placeholder="请输入房屋名称搜索"
        @search="method?.handleSearch" />
    </view>
    <view class="house_content">
      <hs-empty v-if="!useModel?.listData?.value?.length" />
      <view v-for="(i, index) in useModel?.listData?.value" :key="`item_${index}`" class="house_item"
        @click="method?.handleSelect(i)">
        <view class="name">
          {{ i?.label }}
        </view>
        <uni-icons type="right" size="13"></uni-icons>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import method from './method'
import useModel from './model'

onLoad(e => {
  useModel.pageFormData.value = e
  console.log(e, 'eee')
  method?.handleSearch()
})
</script>

<style lang="scss">
@import './style.scss';
</style>
