Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
shenshaokai
jinfa-platform
Commits
1b18a0bc
Commit
1b18a0bc
authored
Aug 10, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加省略展示
parent
26738ceb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
index.less
src/components/AuditProcess/index.less
+6
-0
index.tsx
src/components/AuditProcess/index.tsx
+7
-1
No files found.
src/components/AuditProcess/index.less
View file @
1b18a0bc
@import '../../global/styles/utils.less';
.steps {
padding-top: 2px;
overflow: auto;
...
...
@@ -7,5 +9,9 @@
max-width: 100px;
// margin-right: 8px;
text-align: center;
&.ellipsis {
.textOverflow();
}
}
}
src/components/AuditProcess/index.tsx
View file @
1b18a0bc
...
...
@@ -10,6 +10,7 @@ import {
Steps
,
Tooltip
,
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
ButtonTabs
,
{
ButtonTabsProps
}
from
'../ButtonTabs'
;
import
styles
from
'./index.less'
;
...
...
@@ -57,6 +58,10 @@ interface AuditProcessProp extends Omit<ButtonTabsProps, 'options'> {
* 自定义item key键名
*/
customKey
?:
string
/**
* 是否省略title超出的内容,默认为 false
*/
ellipsis
?:
boolean
};
const
AuditProcess
:
React
.
FC
<
AuditProcessProp
>
=
({
...
...
@@ -66,6 +71,7 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
innerVerifySteps
,
customTitleKey
,
customKey
,
ellipsis
=
false
,
...
rest
})
=>
{
const
[
radioValue
,
setRadioValue
]
=
useState
<
(
'inner'
|
'outer'
)
>
(
'inner'
);
...
...
@@ -108,7 +114,7 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
}
return
(
<
Tooltip
placement=
"top"
title=
{
stepTitle
}
>
<
span
className=
{
styles
.
title
}
>
{
`${stepTitle}`
}
</
span
>
<
span
className=
{
classNames
(
styles
.
title
,
{
[
styles
.
ellipsis
]:
ellipsis
})
}
>
{
`${stepTitle}`
}
</
span
>
</
Tooltip
>
)
}
...
...
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