mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 12:57:10 +08:00
style: 优化 GiForm 表单使用代码
This commit is contained in:
@@ -143,6 +143,7 @@ const getComponentBindProps = (item: ColumnItem) => {
|
||||
// 组件默认配置映射表
|
||||
const ConfigMap = new Map<ColumnItem['type'], Partial<ColumnItem['props'] & { placeholder: string }>>([
|
||||
['input', { allowClear: true, placeholder: `请输入${item.label}`, maxLength: 255, showWordLimit: true }],
|
||||
['input-password', { placeholder: `请输入${item.label}` }],
|
||||
['input-number', { placeholder: `请输入${item.label}` }],
|
||||
['textarea', { allowClear: false, placeholder: `请输入${item.label}`, maxLength: 200, showWordLimit: true, autoSize: { minRows: 3, maxRows: 5 } }],
|
||||
['input-tag', { allowClear: true, placeholder: `请输入${item.label}` }],
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { VNode } from 'vue'
|
||||
|
||||
export type ColumnItemType =
|
||||
| 'input'
|
||||
| 'input-password'
|
||||
| 'input-number'
|
||||
| 'input-tag'
|
||||
| 'textarea'
|
||||
@@ -29,6 +30,7 @@ export type ColumnItemType =
|
||||
|
||||
export type ComponentProps =
|
||||
& A.InputInstance['$props']
|
||||
& A.InputPasswordInstance['$props']
|
||||
& A.InputNumberInstance['$props']
|
||||
& A.InputTagInstance['$props']
|
||||
& A.TextareaInstance['$props']
|
||||
|
||||
Reference in New Issue
Block a user