2023-04-02 01:01:56 +08:00
|
|
|
<template>
|
2023-04-03 00:05:09 +08:00
|
|
|
<el-form ref="basicInfoForm" :model="infoForm" :rules="rules" label-width="150px">
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="表名称" prop="tableName">
|
|
|
|
<el-input placeholder="请输入仓库名称" v-model="infoForm.tableName" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="表描述" prop="tableComment">
|
|
|
|
<el-input placeholder="请输入" v-model="infoForm.tableComment" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="实体类名称" prop="className">
|
|
|
|
<el-input placeholder="请输入" v-model="infoForm.className" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="作者" prop="functionAuthor">
|
|
|
|
<el-input placeholder="请输入" v-model="infoForm.functionAuthor" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
<el-input type="textarea" :rows="3" v-model="infoForm.remark"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-form>
|
2023-04-02 01:01:56 +08:00
|
|
|
</template>
|
2023-04-03 00:26:04 +08:00
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { PropType } from 'vue';
|
|
|
|
|
|
|
|
const prop = defineProps({
|
|
|
|
info: {
|
|
|
|
type: Object as PropType<any>,
|
|
|
|
default: () => {
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
const infoForm = computed(() => prop.info)
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
const rules = ref({
|
|
|
|
tableName: [{ required: true, message: "请输入表名称", trigger: "blur" }],
|
|
|
|
tableComment: [{ required: true, message: "请输入表描述", trigger: "blur" }],
|
|
|
|
className: [{ required: true, message: "请输入实体类名称", trigger: "blur" }],
|
|
|
|
functionAuthor: [{ required: true, message: "请输入作者", trigger: "blur" }]
|
|
|
|
});
|
|
|
|
</script>
|