<template>
  <el-form
    class="edit-form-main"
    v-bind="$attrs"
    ref="editForm"
    :size="formSize"
    :label-width="labelWidth"
    :model="formModel"
    :rules="formRules"
    :disabled="formType === 'view' || formType === 'approval'"
    :inline="true"
    v-on="listeners">
    <slot></slot>
  </el-form>
</template>
<script>
import { EditFormMixin } from './edit-form-mixin'

export default {
  name: "CmsEditForm",
  mixins: [ EditFormMixin ],
  provide: {
    init() {
      return this.initFun;
    },
  },

};
</script>

<style scoped lang="less">
.edit-form-main {
  padding: 20px 0 0 0;
}

/deep/ .ant-card-body {
  padding: 0 !important;
  position: static;
}

/deep/ .ant-modal-footer {
  padding: 10px;
  text-align: right;
  background: transparent;
  border-top: 1px solid #f0f0f0;
  border-radius: 0 0 4px 4px;
}

.edit-form-page {
  padding: 20px 20px 0 0 !important;
  flex-direction: column;
}

/deep/ .ant-modal-body {
  padding: 0 !important;
}

/deep/ .ant-card-bordered {
  border: 0;
}
</style>
