<!-- in-item 自定义slot (点击label时不会触发事件) -->
<template>
    <el-form-item class="c-item" :label="name" :rules="required ? {required: true} : rules " @click.stop="$event.preventDefault()">
        <slot></slot>
    </el-form-item>
</template>

<script setup name="in-item">

defineProps({
    name: {},
    // 表单校验 
    rules: {},
    required: {
        type: Boolean
    }
})

</script>

<style scoped>

</style>
