<!--属性栏-->
<template>
  <div class="propertys">
    <baseTextProVue v-show="itemType == 'BaseText'"></baseTextProVue>
    <baseLinePro v-show="itemType == 'BaseLine'"></baseLinePro>
    <BaseExplainPro v-show="itemType == 'BaseExplain'"></BaseExplainPro>
    <BaseImagePro v-show="itemType == 'BaseImage'"></BaseImagePro>
  </div>
</template>
<script>
import baseTextProVue from "./baseTextPro.vue";
import baseLinePro from "./baseLinePro.vue";
import BaseExplainPro from "./BaseExplainPro";
import BaseImagePro from "./BaseImagePro";
import bus from "@/bus/bus";
export default {
  components: { baseTextProVue, baseLinePro, BaseExplainPro, BaseImagePro },
  data() {
    return {
      itemType: "",
    };
  },
  mounted() {
    bus.$on("emitChoice", this.emitChoice);
  },
  methods: {
    emitChoice(itemList) {
      if (itemList.length == 1) {
        this.itemType = itemList[0].data.Type ? itemList[0].data.Type : "";
      } else {
        this.itemType = "";
      }
    },
  },
};
</script>
<style lang="less" scoped>
.propertys {
}
</style>