<!--
 * @Author: wlo_o
 * @Date: 2022-02-17 15:56:42
 * @LastEditors: Jone
 * @LastEditTime: 2022-07-01 17:24:04
 * @FilePath: /frontend/lib/components/MdSubsetForm.vue
 * @Description: 子集详情
 *
 * 注意：当前组件只展示，不用做编辑，子集编辑使用 MdSetForm 传入 parentId
 * md-set-form 里默认隐藏了element-list 下面单独初始化一个
 * Copyright (c) 2022 by 青岛百洋智能科技股份有限公司, All Rights Reserved.
-->
<template>
  <div class="oecp-md-subset-form">
    <md-set-form
      :id="id"
      :type="type"
      :title="title"
      :showGoBack="true"
      :showSubset="false"
      :showCategory="false"
      :showSaveBtn="editable"
      :editable="editable"
      ref="form"
    />
    <md-set-element-list
      :id="id"
      :type="type"
      :editable="editable"
      :allowDelete="true"
      :showImport="true"
    ></md-set-element-list>
  </div>
</template>
<script>
import OptionsMixin from '../mixins/OptionsMixin'
import EventMixin from '../mixins/EventMixin'

export default {
  mixins: [OptionsMixin, EventMixin],
  props: {
    title: { type: [String, null], default: '' },
    id: { type: String, default: null }, // 数据集主键
    type: { type: String, default: null },
    editable: { type: Boolean, default: false },
  },
}
</script>
<style scoped>
.oecp-md-subset-form {
  background: #fff !important;
  height: 100%;
}
</style>
