<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;
    },
  },
  created() {
    this.$refs.editForm.clearValidate();
  },
};
</script>

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

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