<template>
    <div class="detail-container">
        <el-form ref="formRef" :model="form" label-position="right" label-width="auto"
            style="max-height: 60vh; overflow-y: auto;" :rules="rules">
            <el-row>
                <el-col :span="24">
                    <el-form-item label="" prop="驳回原因">
                        <el-input v-model="form.rejectReason"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </div>
</template>

<script setup>
import { ref, onMounted, watch, computed } from "vue";
import { request } from "@/utils/request";
const formRef = ref(null);
defineExpose({ formRef });

const props = defineProps({
    form: {
        type: Object,
        default: () => ({}),
    },
});

const rules = computed(() => {
    return {
        驳回原因: [
            {
                required: true,
                validator: (rule, value, callback) => {
                    if (props.form.rejectReason) {
                        callback();
                    } else {
                        callback(new Error("请输入驳回原因"));
                    }
                },
                trigger: "blur",
            },
        ],
    };
});
</script>

<style></style>