Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
03b17a8f
Unverified
Commit
03b17a8f
authored
Jul 18, 2021
by
lzdjack
Committed by
GitHub
Jul 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(formItem): Fix labelcol type mismatch (#903)
*修复antdv升级后formItem中labelCol没有类型style的bug
parent
8832a074
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
91 deletions
+91
-91
formItem.ts
src/components/Form/src/types/formItem.ts
+91
-91
No files found.
src/components/Form/src/types/formItem.ts
View file @
03b17a8f
import
type
{
NamePath
}
from
'
ant-design-vue/lib/form/interface
'
;
import
type
{
ColProps
}
from
'
ant-design-vue/lib/grid/Col
'
;
import
type
{
VNodeChild
}
from
'
vue
'
;
export
interface
FormItem
{
/**
* Used with label, whether to display : after label text.
* @default true
* @type boolean
*/
colon
?:
boolean
;
/**
* The extra prompt message. It is similar to help. Usage example: to display error message and prompt message at the same time.
* @type any (string | slot)
*/
extra
?:
string
|
VNodeChild
|
JSX
.
Element
;
/**
* Used with validateStatus, this option specifies the validation status icon. Recommended to be used only with Input.
* @default false
* @type boolean
*/
hasFeedback
?:
boolean
;
/**
* The prompt message. If not provided, the prompt message will be generated by the validation rule.
* @type any (string | slot)
*/
help
?:
string
|
VNodeChild
|
JSX
.
Element
;
/**
* Label test
* @type any (string | slot)
*/
label
?:
string
|
VNodeChild
|
JSX
.
Element
;
/**
* The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with <Col>
* @type Col
*/
labelCol
?:
ColProps
;
/**
* Whether provided or not, it will be generated by the validation rule.
* @default false
* @type boolean
*/
required
?:
boolean
;
/**
* The validation status. If not provided, it will be generated by validation rule. options: 'success' 'warning' 'error' 'validating'
* @type string
*/
validateStatus
?:
''
|
'
success
'
|
'
warning
'
|
'
error
'
|
'
validating
'
;
/**
* The layout for input controls, same as labelCol
* @type Col
*/
wrapperCol
?:
ColProps
;
/**
* Set sub label htmlFor.
*/
htmlFor
?:
string
;
/**
* text align of label
*/
labelAlign
?:
'
left
'
|
'
right
'
;
/**
* a key of model. In the setting of validate and resetFields method, the attribute is required
*/
name
?:
NamePath
;
/**
* validation rules of form
*/
rules
?:
object
|
object
[];
/**
* Whether to automatically associate form fields. In most cases, you can setting automatic association.
* If the conditions for automatic association are not met, you can manually associate them. See the notes below.
*/
autoLink
?:
boolean
;
/**
* Whether stop validate on first rule of error for this field.
*/
validateFirst
?:
boolean
;
/**
* When to validate the value of children node
*/
validateTrigger
?:
string
|
string
[]
|
false
;
}
import
type
{
NamePath
}
from
'
ant-design-vue/lib/form/interface
'
;
import
type
{
ColProps
}
from
'
ant-design-vue/lib/grid/Col
'
;
import
type
{
HTMLAttributes
,
VNodeChild
}
from
'
vue
'
;
export
interface
FormItem
{
/**
* Used with label, whether to display : after label text.
* @default true
* @type boolean
*/
colon
?:
boolean
;
/**
* The extra prompt message. It is similar to help. Usage example: to display error message and prompt message at the same time.
* @type any (string | slot)
*/
extra
?:
string
|
VNodeChild
|
JSX
.
Element
;
/**
* Used with validateStatus, this option specifies the validation status icon. Recommended to be used only with Input.
* @default false
* @type boolean
*/
hasFeedback
?:
boolean
;
/**
* The prompt message. If not provided, the prompt message will be generated by the validation rule.
* @type any (string | slot)
*/
help
?:
string
|
VNodeChild
|
JSX
.
Element
;
/**
* Label test
* @type any (string | slot)
*/
label
?:
string
|
VNodeChild
|
JSX
.
Element
;
/**
* The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with <Col>
* @type Col
*/
labelCol
?:
ColProps
&
HTMLAttributes
;
/**
* Whether provided or not, it will be generated by the validation rule.
* @default false
* @type boolean
*/
required
?:
boolean
;
/**
* The validation status. If not provided, it will be generated by validation rule. options: 'success' 'warning' 'error' 'validating'
* @type string
*/
validateStatus
?:
''
|
'
success
'
|
'
warning
'
|
'
error
'
|
'
validating
'
;
/**
* The layout for input controls, same as labelCol
* @type Col
*/
wrapperCol
?:
ColProps
;
/**
* Set sub label htmlFor.
*/
htmlFor
?:
string
;
/**
* text align of label
*/
labelAlign
?:
'
left
'
|
'
right
'
;
/**
* a key of model. In the setting of validate and resetFields method, the attribute is required
*/
name
?:
NamePath
;
/**
* validation rules of form
*/
rules
?:
object
|
object
[];
/**
* Whether to automatically associate form fields. In most cases, you can setting automatic association.
* If the conditions for automatic association are not met, you can manually associate them. See the notes below.
*/
autoLink
?:
boolean
;
/**
* Whether stop validate on first rule of error for this field.
*/
validateFirst
?:
boolean
;
/**
* When to validate the value of children node
*/
validateTrigger
?:
string
|
string
[]
|
false
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment