<template>
  <div class="edit-pane-box">
    <el-form
      ref="modalFormComp"
      :key="modalForm.id"
      :model="modalForm"
      label-width="100px"
    >
      <el-form-item label="边框形状：">
        <line-style-select
          v-model="modalForm.borderStyle"
          show-empty
        ></line-style-select>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import LineStyleSelect from "../../../card/components/common/LineStyleSelect";

const initModalForm = {
  id: "",
  borderStyle: "none",
};

export default {
  name: "EditPaneBox",
  components: { LineStyleSelect },
  props: {
    instance: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  data() {
    return {
      modalForm: { ...initModalForm },
    };
  },
  mounted() {
    this.initData(this.instance);
  },
  methods: {
    initData(val) {
      this.modalForm = { ...val };
    },
    submit() {
      this.$emit("modified", this.modalForm);
    },
  },
};
</script>
