Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
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
baiguangyao
mr-julyedu
Commits
d68ca51e
Commit
d68ca51e
authored
Jun 13, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组件优化
parent
e2ecada9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
src/common/HeaderBar/index.js
+21
-10
src/components/order/orderinfo.js
+1
-1
No files found.
src/common/HeaderBar/index.js
View file @
d68ca51e
import
React
from
'react'
import
'./index.scss'
import
React
,
{
Component
}
from
'react'
import
'./index.scss'
;
const
HeaderBar
=
(
props
)
=>
{
return
(
<
div
className
=
"detail-header"
style
=
{{...
props
.
style
}}
>
<
i
className
=
{
`iconfont
${
props
.
arrow
?
'iconiconfront-68'
:
''
}
return`
}
onClick
=
{
props
.
goBack
}
><
/i
>
<
span
className
=
'herder'
>
{
props
.
title
}
<
/span
>
<
i
className
=
{
`iconfont
${
props
.
cart
?
'icongouwuche-xianxing'
:
''
}
shopping-cart`
}
onClick
=
{
props
.
goShop
}
><
/i
>
<
/div
>
);
class
HeaderBar
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
goBack
=
()
=>
{
window
.
history
.
go
(
-
1
);
}
goShop
=
()
=>
{
location
.
replace
(
'/shopcart'
);
}
render
()
{
return
(
<
div
className
=
"detail-header"
style
=
{{...
this
.
props
.
style
}}
>
<
i
className
=
{
`iconfont
${
this
.
props
.
arrow
?
'iconiconfront-68'
:
''
}
return`
}
onClick
=
{
this
.
goBack
}
><
/i
>
<
span
className
=
'herder'
>
{
this
.
props
.
title
}
<
/span
>
<
i
className
=
{
`iconfont
${
this
.
props
.
cart
?
'icongouwuche-xianxing'
:
''
}
shopping-cart`
}
onClick
=
{
this
.
goShop
}
><
/i
>
<
/div
>
);
}
};
export
default
HeaderBar
;
src/components/order/orderinfo.js
View file @
d68ca51e
...
...
@@ -79,7 +79,7 @@ const MyForm = withFormik({
return
;
}
Toast
.
info
(
'保存成功!'
,
undefined
,
undefined
,
false
);
FormBag
.
props
.
history
.
push
({
FormBag
.
props
.
history
.
replace
({
pathname
:
'/order'
,
state
:
values
});
...
...
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