<template>
  <div class="mw-cpt a-fade-in"
       :ref="item.tempOnlyId"
       :title="item.componentName"
       :class="{'z-focused': isFocused}"
       @click="focusCpt">

    <!-- 最顶部标题组件 -->
    <div v-if="item.componentFrontId==='resi-titleList-home-gridNameTitle'"
         class="page_header">
      <img class="img_icon"
           v-if="item.demoData.ico"
           :src="item.demoData.ico">
      <img class="img_icon"
           v-else
           src="@/assets/img/modules/wx-mini/index-set/page/dang.png">
      <span>{{ item.demoData.title }}</span>
      <img class="img_arrow"
           src="@/assets/img/modules/wx-mini/index-set/arrow-right.png">
      <div class="right">
        <div class="score_title">积分</div>
        <span class="span_score_score">999</span>
        <span class="span_slicer">|</span>
        <span class="span_mine">我的</span>
      </div>

    </div>
  </div>

</template>

<script>

export default {
  name: 'cptItem',
  data () {
    return {}
  },
  components: {
  },
  props: {
    isFocused: Boolean,
    item: Object
  },
  methods: {

    focusCpt () {
      this.$emit('focusCpt', this.item)
    }
  }
}
</script>
<style lang="scss" src="@/assets/scss/modules/wx-mini/page-header.scss"></style>
