mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-10 20:57:10 +08:00
fix: 完善部分输入表单项字符长度限制
Closes #IBPYW5
This commit is contained in:
@@ -142,7 +142,7 @@ const dicData: Record<string, any> = reactive({})
|
|||||||
const getComponentBindProps = (item: ColumnItem) => {
|
const getComponentBindProps = (item: ColumnItem) => {
|
||||||
// 组件默认配置映射表
|
// 组件默认配置映射表
|
||||||
const ConfigMap = new Map<ColumnItem['type'], Partial<ColumnItem['props'] & { placeholder: string }>>([
|
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}` }],
|
['input-number', { placeholder: `请输入${item.label}` }],
|
||||||
['textarea', { allowClear: false, placeholder: `请输入${item.label}`, maxLength: 200 }],
|
['textarea', { allowClear: false, placeholder: `请输入${item.label}`, maxLength: 200 }],
|
||||||
['input-tag', { allowClear: true, placeholder: `请输入${item.label}` }],
|
['input-tag', { allowClear: true, placeholder: `请输入${item.label}` }],
|
||||||
|
@@ -149,6 +149,10 @@ const formColumns: ColumnItem[] = reactive([
|
|||||||
label: '作者名称',
|
label: '作者名称',
|
||||||
field: 'author',
|
field: 'author',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
|
props: {
|
||||||
|
maxLength: 100,
|
||||||
|
showWordLimit: true,
|
||||||
|
},
|
||||||
rules: [{ required: true, message: '请输入作者名称' }],
|
rules: [{ required: true, message: '请输入作者名称' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -157,6 +161,8 @@ const formColumns: ColumnItem[] = reactive([
|
|||||||
type: 'input',
|
type: 'input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '自定义业务名称,例如:用户',
|
placeholder: '自定义业务名称,例如:用户',
|
||||||
|
maxLength: 50,
|
||||||
|
showWordLimit: true,
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: '请输入业务名称' }],
|
rules: [{ required: true, message: '请输入业务名称' }],
|
||||||
},
|
},
|
||||||
@@ -166,6 +172,8 @@ const formColumns: ColumnItem[] = reactive([
|
|||||||
type: 'input',
|
type: 'input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '项目模块名称,例如:continew-system',
|
placeholder: '项目模块名称,例如:continew-system',
|
||||||
|
maxLength: 60,
|
||||||
|
showWordLimit: true,
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: '请输入所属模块' }],
|
rules: [{ required: true, message: '请输入所属模块' }],
|
||||||
},
|
},
|
||||||
@@ -175,6 +183,8 @@ const formColumns: ColumnItem[] = reactive([
|
|||||||
type: 'input',
|
type: 'input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '项目模块包名,例如:top.continew.admin.system',
|
placeholder: '项目模块包名,例如:top.continew.admin.system',
|
||||||
|
maxLength: 60,
|
||||||
|
showWordLimit: true,
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: '请输入模块包名' }],
|
rules: [{ required: true, message: '请输入模块包名' }],
|
||||||
},
|
},
|
||||||
@@ -184,7 +194,8 @@ const formColumns: ColumnItem[] = reactive([
|
|||||||
type: 'input',
|
type: 'input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '数据库表前缀,例如:sys_',
|
placeholder: '数据库表前缀,例如:sys_',
|
||||||
width: '200',
|
maxLength: 20,
|
||||||
|
showWordLimit: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<a-input v-model="form.email" placeholder="请输入邮箱" allow-clear />
|
<a-input v-model="form.email" placeholder="请输入邮箱" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="captcha" hide-label>
|
<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
|
<a-button
|
||||||
class="captcha-btn"
|
class="captcha-btn"
|
||||||
:loading="captchaLoading"
|
:loading="captchaLoading"
|
||||||
|
Reference in New Issue
Block a user