<template>
    <el-form
        ref="form"
        :model="model"
        inline
        :label-position="labelPosition"
        :rules="rules"
    >
        <div class="flex-container">
            <slot></slot>
        </div>
    </el-form>
</template>
<script>
export default {
    props: {
        model: Object,
        labelPosition: {
            type: String,
            default: 'top',
        },
        rules: {
            type: Object,
        },
    },
    methods: {
        validate(){
            return this.$refs.form.validate.call(this, ...arguments)
        }
    }
}
</script>
<style scoped>
.flex-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
</style>
