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
f455fb97
Unverified
Commit
f455fb97
authored
May 18, 2021
by
Mikasa33
Committed by
GitHub
May 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(form): helpMessage Increase function type value (#616)
* feat(form): helpMessage * feat(form): helpMessage
parent
0e440f07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
FormItem.vue
src/components/Form/src/components/FormItem.vue
+3
-2
form.ts
src/components/Form/src/types/form.ts
+1
-1
No files found.
src/components/Form/src/components/FormItem.vue
View file @
f455fb97
...
...
@@ -261,13 +261,14 @@
)
:
(
label
);
if
(
!
helpMessage
||
(
Array
.
isArray
(
helpMessage
)
&&
helpMessage
.
length
===
0
))
{
const
getHelpMessage
=
isFunction
(
helpMessage
)
?
helpMessage
(
unref
(
getValues
))
:
helpMessage
;
if
(
!
getHelpMessage
||
(
Array
.
isArray
(
getHelpMessage
)
&&
getHelpMessage
.
length
===
0
))
{
return
renderLabel
;
}
return
(
<
span
>
{
renderLabel
}
<
BasicHelp
placement
=
"
top
"
class
=
"
mx-1
"
text
=
{
h
elpMessage
}
{...
helpComponentProps
}
/
>
<
BasicHelp
placement
=
"
top
"
class
=
"
mx-1
"
text
=
{
getH
elpMessage
}
{...
helpComponentProps
}
/
>
<
/span
>
);
}
...
...
src/components/Form/src/types/form.ts
View file @
f455fb97
...
...
@@ -125,7 +125,7 @@ export interface FormSchema {
// Auxiliary text
subLabel
?:
string
;
// Help text on the right side of the text
helpMessage
?:
string
|
string
[];
helpMessage
?:
string
|
string
[]
|
((
renderCallbackParams
:
RenderCallbackParams
)
=>
string
|
string
[])
;
// BaseHelp component props
helpComponentProps
?:
Partial
<
HelpComponentProps
>
;
// Label width, if it is passed, the labelCol and WrapperCol configured by itemProps will be invalid
...
...
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