<template>
  <div class="AppBuilding">
    <component
        :is="component"
        @change="onChange"
        :params="params">
    </component>
  </div>
</template>

<script>
import Detail from './detail'
import Add from './add'
import List from './list'
import SearchMap from './components/searchMap'
import Map from './map'

export default {
  name: 'AppBuilding',
  appName: '以房找人',

  data() {
    return {
      component: 'SearchMap',
      params: {}
    }
  },

  components: {Detail, Add, List, SearchMap, Map},

  methods: {
    onChange(e) {
      this.params = e.params
      this.component = e.type
    }
  },
  mounted() {
    document.title = "以房找人"
  }
}
</script>

<style lang="scss" scoped>
uni-page-body {
  height: 100%;
}

.AppBuilding {
  height: 100%;
}
</style>
