Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
ReactWeb5
CivManage
Commits
70cc8739
Commit
70cc8739
authored
Nov 25, 2020
by
Maofei94
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of g.civnet.cn:test/maintenance
parents
17ef2560
a54591f2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
index.tsx
src/components/Upload/index.tsx
+6
-2
index.js
src/pages/webConfig/index.js
+4
-1
index.less
src/pages/webConfig/index.less
+8
-1
No files found.
src/components/Upload/index.tsx
View file @
70cc8739
...
...
@@ -48,6 +48,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
previewTitle
:
''
,
imgBed
:
[],
curSelectedImg
:
''
,
prevProps
:{},
fileList
:
this
.
props
.
value
?
Array
.
isArray
(
this
.
props
.
value
)
?
this
.
props
.
value
.
map
((
v
)
=>
({
url
:
v
,
uid
:
uuid
(
8
,
16
),
...
...
@@ -64,8 +65,9 @@ class PicturesWall extends React.Component<PicturesWallType> {
static
getDerivedStateFromProps
=
(
props
,
state
)
=>
{
const
fileList
=
state
.
fileList
;
const
shouldUpdate
=
props
.
value
&&
fileList
.
every
(
f
=>
Array
.
isArray
(
props
.
value
)
?
!
props
.
value
.
some
(
v
=>
f
.
url
===
v
)
:
f
.
url
!==
props
.
value
)
if
(
fileList
.
length
===
0
&&
p
rops
.
value
&&
shouldUpdate
){
if
(
props
.
value
!==
state
.
prevP
rops
.
value
&&
shouldUpdate
){
return
{
provProps
:
props
,
fileList
:
Array
.
isArray
(
props
.
value
)
?
props
.
value
.
map
((
v
)
=>
({
url
:
v
,
uid
:
uuid
(
8
,
16
),
...
...
@@ -79,7 +81,9 @@ class PicturesWall extends React.Component<PicturesWallType> {
}]
as
UploadFile
<
any
>
[]
}
}
return
null
;
return
{
prevProps
:
props
};
}
update
=
()
=>
{
...
...
src/pages/webConfig/index.js
View file @
70cc8739
...
...
@@ -39,11 +39,14 @@ const WebConfigPage = props => {
},
[]);
useEffect
(()
=>
{
if
(
!
curWeb
)
return
;
const
title
=
curWeb
.
text
;
// eslint-disable-next-line no-unused-expressions
curWeb
&&
getWebconfig
(
curWeb
.
text
).
then
(
res
=>
{
setConfigObj
(
res
);
if
(
title
===
curWeb
.
text
)
{
setToEdit
(
res
);
}
});
},
[
curWeb
]);
...
...
src/pages/webConfig/index.less
View file @
70cc8739
.webConfigContainer{
position: absolute;
width: 100%;
height: 100%;
.ant-tabs-content-holder>.ant-tabs-content.ant-tabs-content-top{
position: absolute;
width: 100%;
height: calc(100% - 40px);
}
}
.webConfigContainer > .ant-tabs-card .ant-tabs-content {
...
...
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