<template>
  <section class="AiDvPanel">
    <component :is="border" :title="title" v-if="border">
      <template v-if="$slots.title" #title>
        <slot name="title"/>
      </template>
      <slot/>
    </component>
    <slot style="width: 100%; height: 100%;" v-else></slot>
  </section>
</template>

<script>
import Border1 from "./borders/border1";
import Border0 from "./borders/border0";
import Border2 from "./borders/border2";
import Border3 from "./borders/border3";
import Border4 from "./borders/border4";

export default {
  name: "AiDvPanel",
  components: { Border0, Border1, Border2, Border3, Border4 },
  props: {
    title: {default: "请传入标题"},
    border: {default: "border0"}
  },
  mounted() {
  },
}
</script>

<style lang="scss" scoped>
.AiDvPanel {
  height: 100%;

  * {
    box-sizing: border-box;
  }
}
</style>
