mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 12:57:11 +08:00
feat(generator): 代码生成字段配置支持自定义名称、类型
This commit is contained in:
@@ -66,11 +66,28 @@
|
||||
</a-tooltip>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
<template #fieldName="{ record }">
|
||||
<a-input v-model="record.fieldName" />
|
||||
</template>
|
||||
<template #fieldType="{ record }">
|
||||
<span v-if="record.fieldType">{{ record.fieldType }}</span>
|
||||
<a-tooltip v-else content="请检查 generator.properties 配置">
|
||||
<icon-exclamation-circle-fill size="large" style="color: #f53f3f" />
|
||||
</a-tooltip>
|
||||
<a-select
|
||||
v-model="record.fieldType"
|
||||
placeholder="请选择字段类型"
|
||||
allow-search
|
||||
allow-create
|
||||
:error="!record.fieldType"
|
||||
>
|
||||
<a-option value="String">String</a-option>
|
||||
<a-option value="Integer">Integer</a-option>
|
||||
<a-option value="Long">Long</a-option>
|
||||
<a-option value="Float">Float</a-option>
|
||||
<a-option value="Double">Double</a-option>
|
||||
<a-option value="Boolean">Boolean</a-option>
|
||||
<a-option value="BigDecimal">BigDecimal</a-option>
|
||||
<a-option value="LocalDate">LocalDate</a-option>
|
||||
<a-option value="LocalTime">LocalTime</a-option>
|
||||
<a-option value="LocalDateTime">LocalDateTime</a-option>
|
||||
</a-select>
|
||||
</template>
|
||||
<template #comment="{ record }">
|
||||
<a-input v-model="record.comment" />
|
||||
@@ -93,6 +110,7 @@
|
||||
v-if="record.showInForm || record.showInQuery"
|
||||
v-model="record.formType"
|
||||
:options="form_type_enum"
|
||||
:default-value="1"
|
||||
placeholder="请选择表单类型"
|
||||
/>
|
||||
<span v-else>无需设置</span>
|
||||
@@ -102,6 +120,7 @@
|
||||
v-if="record.showInQuery"
|
||||
v-model="record.queryType"
|
||||
:options="query_type_enum"
|
||||
:default-value="1"
|
||||
placeholder="请选择查询方式"
|
||||
/>
|
||||
<span v-else>无需设置</span>
|
||||
@@ -138,14 +157,14 @@ const { form_type_enum, query_type_enum } = useDict('form_type_enum', 'query_typ
|
||||
|
||||
// Table 字段配置
|
||||
const columns: TableInstanceColumns[] = [
|
||||
{ title: '名称', dataIndex: 'fieldName', width: 125, ellipsis: true, tooltip: true },
|
||||
{ title: '类型', dataIndex: 'fieldType' },
|
||||
{ title: '名称', slotName: 'fieldName' },
|
||||
{ title: '类型', slotName: 'fieldType' },
|
||||
{ title: '描述', slotName: 'comment', width: 170 },
|
||||
{ title: '列表', slotName: 'showInList', width: 60, align: 'center' },
|
||||
{ title: '表单', slotName: 'showInForm', width: 60, align: 'center' },
|
||||
{ title: '必填', slotName: 'isRequired', width: 60, align: 'center' },
|
||||
{ title: '查询', slotName: 'showInQuery', width: 60, align: 'center' },
|
||||
{ title: '表单类型', slotName: 'formType', width: 150 },
|
||||
{ title: '表单类型', slotName: 'formType' },
|
||||
{ title: '查询方式', slotName: 'queryType' },
|
||||
{ title: '关联字典', slotName: 'dictCode' }
|
||||
]
|
||||
|
Reference in New Issue
Block a user