<template>
  <div class="wrapper">
    <showCollection @hideSlide="data=>{showSidebar = data}" class="ui-broadcast" :item="cItem"></showCollection>
  </div>
</template>
<script>
import showCollection from './showCollection'
import { getDetailById } from "@/config/api";

export default {
  props: ['item'],
  components: {
    showCollection
  },
  data() {
    return {
      cItem: { ...this.item },
      showSidebar: false
    };
  },
  methods: {
    handleItem(data) {
      this.cItem = data
    },
    getCollectionDetail() {
      getDetailById("goods", { id: this.cItem.id }, (res) => {
        console.log(res.data);
        this.cItem = res.data
      });
    }
  },
  mounted() {
    this.getCollectionDetail()
  }
};
</script>

<style lang="scss" scoped>
.wrapper {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  .ui-broadcast {
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    background: rgba(48, 48, 48, 0.8);
  }
}
</style>