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
陈智峰
jinfa-platform
Commits
e9600160
Commit
e9600160
authored
May 10, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加 AnchorPageHeader组件
parent
4ab0ac71
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
1 deletion
+141
-1
index.less
src/components/AnchorPageHeader/index.less
+45
-0
index.tsx
src/components/AnchorPageHeader/index.tsx
+80
-0
index.less
...ervice/returnApplication/components/DetailInfo/index.less
+3
-0
index.tsx
...Service/returnApplication/components/DetailInfo/index.tsx
+13
-1
No files found.
src/components/AnchorPageHeader/index.less
0 → 100644
View file @
e9600160
@import '~antd/es/style/themes/default.less';
.anchor-page-header {
display: flex;
background: #FFFFFF;
&-left {
flex: 1;
overflow: hidden;
}
&-right {
padding-top: 14px;
flex-shrink: 0;
margin-left: 12px;
}
&-heading {
padding: 14px 0;
display: flex;
align-items: center;
&-title {
margin-bottom: 0;
color: rgba(0, 0, 0, 0.85);
font-weight: 600;
font-size: 18px;
line-height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
&-back {
margin-right: 12px;
font-size: 16px;
cursor: pointer;
&:hover {
color: @primary-color;
}
}
}
\ No newline at end of file
src/components/AnchorPageHeader/index.tsx
0 → 100644
View file @
e9600160
/*
* @Author: XieZhiXiong
* @Date: 2021-05-10 11:36:58
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-10 15:05:20
* @Description: 页面公用锚点头部
*/
import
React
from
'react'
;
import
{
Anchor
,
Button
}
from
'antd'
;
import
{
ArrowLeftOutlined
}
from
'@ant-design/icons'
;
import
{
history
}
from
'umi'
;
import
styles
from
'./index.less'
;
export
interface
AnchorsItem
{
/**
* 跳转标识
*/
key
:
string
,
/**
* 名称
*/
name
:
React
.
ReactNode
,
}
interface
IProps
{
/**
* 标题
*/
title
:
React
.
ReactNode
,
/**
* 右侧拓展部分
*/
extra
?:
React
.
ReactNode
,
/**
* 锚点数据
*/
anchors
:
AnchorsItem
[],
}
const
AnchorPageHeader
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
{
title
,
extra
,
anchors
,
}
=
props
;
const
handleBack
=
()
=>
{
history
.
goBack
();
};
return
(
<
div
className=
{
styles
[
'anchor-page-header'
]
}
>
<
div
className=
{
styles
[
'anchor-page-header-left'
]
}
>
<
div
className=
{
styles
[
'anchor-page-header-heading'
]
}
>
<
ArrowLeftOutlined
className=
{
styles
[
'anchor-page-header-back'
]
}
onClick=
{
handleBack
}
/>
<
span
className=
{
styles
[
'anchor-page-header-heading-title'
]
}
>
{
title
}
</
span
>
</
div
>
<
div
className=
{
styles
[
'anchor-page-header-content'
]
}
>
123
</
div
>
</
div
>
{
extra
?
(
<
div
className=
{
styles
[
'anchor-page-header-right'
]
}
>
{
extra
}
</
div
>
)
:
null
}
</
div
>
);
};
AnchorPageHeader
.
defaultProps
=
{
extra
:
null
,
};
export
default
AnchorPageHeader
;
src/pages/afterService/returnApplication/components/DetailInfo/index.less
View file @
e9600160
...
...
@@ -5,5 +5,7 @@
white-space: break-spaces;
}
}
height: 50px;
overflow-y: auto;
}
}
\ No newline at end of file
src/pages/afterService/returnApplication/components/DetailInfo/index.tsx
View file @
e9600160
...
...
@@ -29,6 +29,7 @@ import {
ORDER_TYPE_TENDER_CONTRACT
,
}
from
'@/constants/order'
;
import
{
normalizeFiledata
,
FileData
,
findLastIndexFlowState
}
from
'@/utils'
;
// import AnchorPageHeader from '@/components/AnchorPageHeader';
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -380,6 +381,10 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
});
};
const
handleScroll
=
(
e
:
React
.
UIEvent
<
HTMLDivElement
>
)
=>
{
console
.
log
(
'e'
,
e
.
currentTarget
.
scrollTop
)
};
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
...
...
@@ -388,6 +393,13 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
}
}
title=
{
<>
{
/* <AnchorPageHeader
title="我是标题"
anchors={[]}
extra={(
<div>123</div>
)}
/> */
}
<
PageHeader
style=
{
{
padding
:
'0'
}
}
onBack=
{
()
=>
history
.
goBack
()
}
...
...
@@ -405,7 +417,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
</>
)
}
>
<
div
className=
{
styles
[
'detailInfo-desc'
]
}
>
<
div
className=
{
styles
[
'detailInfo-desc'
]
}
onScroll=
{
handleScroll
}
>
<
Descriptions
size=
"small"
column=
{
3
}
...
...
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