<template>
  <m-card title="实有人口">
    <!-- <m-sub2 :addition="{ value: truePeople.personnelNum }"> 人口数量 </m-sub2> -->
    <m-sub2 :addition="{ value: 31705, unit: '人' }"> 人口数量 </m-sub2>
    <m-sub2 :addition="{ value: 74394, unit: '人' }"> 本市户籍 </m-sub2>
    <!-- <Brief :list="summary" color="#fff" /> -->
    <div class="content">
      <div v-for="item in population" :key="item.name">
        <m-count class="count" :value="item.value" />
        <div>
          <span>{{ item.name }}</span>
          <!-- <img src="@/assets/images/location.png" /> -->
        </div>
      </div>
    </div>
  </m-card>
</template>

<script lang="ts">
import { computed, defineComponent, ref } from 'vue'
import Brief from '../components/brief.vue'
import inImg from '@/assets/images/in.png'
import out from '@/assets/images/out.png'
import china from '@/assets/images/china.png'

export default defineComponent({
  name: 'Population',
  components: { Brief },
  setup() {
    const summary = computed(() => {
      return [
        { name: '本市户籍', value: 88861, icon: inImg },
        { name: '境外流入', value: 2833, icon: out },
        { name: '境内流入', value: 29052, icon: china },
      ]
    })

    const population = ref([
      { name: '老龄人口', value: 37649 },
      { name: '低保人口', value: 718 },
      { name: '残障人士', value: 3401 },
    ])
    return {
      summary,
      population,
    }
  },
})
</script>

<style lang="stylus" scoped>
@import '../../components/MyComponent/main.styl'

.content
  display flex
  justify-content space-between
  >div
    width 32%
    padding 0.05rem 0.15rem
    .count
      font-size 0.14rem
      font-family $font-barlow
      color $orange
    >div
      display flex
      align-items center
      width 100%
      img
        width 0.1rem
        height @width
        margin-left .05rem
</style>
