<template>
  <div v-if="readonly" class="nomal-text">
    <slot name="readonly">{{ value }}</slot>
  </div>
  <el-form-item v-else :prop="prop" :rules="rules">
    <slot></slot>
  </el-form-item>
</template>

<script>
export default {
  name: 'MyFormItem',
  props: {
    readonly: {
      type: Boolean,
      default: false
    },
    prop: {
      type: String,
      default: ''
    },
    value: null,
    rules: [Array],
  },
  data() {
    return {
      
    }
  },
}
</script>

<style>

</style>