<!-- 基本内容类型 -->
<template>
  <div class="padding-top-bottom">
      <content-info :content.sync='contents' @catalog-change="catalogChange"  :site-config="siteConfig" :catalog-id="catalogId"></content-info>
  </div>
</template>
<script>
import ContentInfo from './ContentInfo.vue'
export default {
  components: {
    'content-info': ContentInfo
  },
  props: {
    content: {
      type: Object,
      required: true
    },
    siteConfig: {
      type: Object
    },
    catalogId: {
      type: [String, Number]
    }
  },
  computed: {
    contents: {
      get() {
        return this.content
      },
      set(val) {
        this.$emit('update:content', val)
      }
    }
  },
  methods: {
    catalogChange(catalog) {
      this.$emit('catalog-change', catalog)
    }
  }
}
</script>
