fix: 完善部分输入表单项字符长度限制

Closes #IBPYW5
This commit is contained in:
2025-03-02 18:47:40 +08:00
parent 47769f9ad8
commit e8249bc4d2
3 changed files with 14 additions and 3 deletions

View File

@@ -142,7 +142,7 @@ const dicData: Record<string, any> = reactive({})
const getComponentBindProps = (item: ColumnItem) => {
// 组件默认配置映射表
const ConfigMap = new Map<ColumnItem['type'], Partial<ColumnItem['props'] & { placeholder: string }>>([
['input', { allowClear: true, placeholder: `请输入${item.label}`, maxLength: 20 }],
['input', { allowClear: true, placeholder: `请输入${item.label}`, maxLength: 255 }],
['input-number', { placeholder: `请输入${item.label}` }],
['textarea', { allowClear: false, placeholder: `请输入${item.label}`, maxLength: 200 }],
['input-tag', { allowClear: true, placeholder: `请输入${item.label}` }],

View File

@@ -149,6 +149,10 @@ const formColumns: ColumnItem[] = reactive([
label: '作者名称',
field: 'author',
type: 'input',
props: {
maxLength: 100,
showWordLimit: true,
},
rules: [{ required: true, message: '请输入作者名称' }],
},
{
@@ -157,6 +161,8 @@ const formColumns: ColumnItem[] = reactive([
type: 'input',
props: {
placeholder: '自定义业务名称,例如:用户',
maxLength: 50,
showWordLimit: true,
},
rules: [{ required: true, message: '请输入业务名称' }],
},
@@ -166,6 +172,8 @@ const formColumns: ColumnItem[] = reactive([
type: 'input',
props: {
placeholder: '项目模块名称例如continew-system',
maxLength: 60,
showWordLimit: true,
},
rules: [{ required: true, message: '请输入所属模块' }],
},
@@ -175,6 +183,8 @@ const formColumns: ColumnItem[] = reactive([
type: 'input',
props: {
placeholder: '项目模块包名例如top.continew.admin.system',
maxLength: 60,
showWordLimit: true,
},
rules: [{ required: true, message: '请输入模块包名' }],
},
@@ -184,7 +194,8 @@ const formColumns: ColumnItem[] = reactive([
type: 'input',
props: {
placeholder: '数据库表前缀例如sys_',
width: '200',
maxLength: 20,
showWordLimit: true,
},
},
{

View File

@@ -12,7 +12,7 @@
<a-input v-model="form.email" placeholder="请输入邮箱" allow-clear />
</a-form-item>
<a-form-item field="captcha" hide-label>
<a-input v-model="form.captcha" placeholder="请输入验证码" :max-length="4" allow-clear style="flex: 1 1" />
<a-input v-model="form.captcha" placeholder="请输入验证码" :max-length="6" allow-clear style="flex: 1 1" />
<a-button
class="captcha-btn"
:loading="captchaLoading"