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
e3d514ba
Commit
e3d514ba
authored
Nov 25, 2020
by
张烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复upload组件更新
parent
ae01a0cf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
index.tsx
src/components/Upload/index.tsx
+2
-2
webConfigForm.js
src/pages/webConfig/components/webConfigForm.js
+7
-1
index.js
src/pages/webConfig/index.js
+5
-1
index.js
src/utils/request/index.js
+1
-5
No files found.
src/components/Upload/index.tsx
View file @
e3d514ba
...
...
@@ -61,9 +61,9 @@ class PicturesWall extends React.Component<PicturesWallType> {
}]
as
UploadFile
<
any
>
[]
:
[],
};
getDerivedStateFromProps
=
(
props
,
state
)
=>
{
static
getDerivedStateFromProps
=
(
props
,
state
)
=>
{
const
fileList
=
state
.
fileList
;
if
(
fileList
.
length
===
0
){
if
(
fileList
.
length
===
0
&&
props
.
value
){
return
{
fileList
:
Array
.
isArray
(
props
.
value
)
?
props
.
value
.
map
((
v
)
=>
({
url
:
v
,
...
...
src/pages/webConfig/components/webConfigForm.js
View file @
e3d514ba
import
BaseForm
from
'@/components/BaseForm'
;
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
use
Effect
,
use
State
}
from
'react'
;
import
{
getLoginPage
,
getMapCofigs
,
...
...
@@ -20,6 +20,12 @@ const WebConfigForm = props => {
setForm
(
f
);
};
useEffect
(()
=>
{
if
(
form
)
{
form
.
setFieldsValue
(
config
);
}
},
[
config
]);
const
onGetThemes
=
()
=>
{
if
(
webThemes
.
length
===
0
)
{
getWebThemes
().
then
(
res
=>
setWebThemes
(
res
));
...
...
src/pages/webConfig/index.js
View file @
e3d514ba
...
...
@@ -40,7 +40,11 @@ const WebConfigPage = props => {
useEffect
(()
=>
{
// eslint-disable-next-line no-unused-expressions
curWeb
&&
getWebconfig
(
curWeb
.
text
).
then
(
res
=>
setConfigObj
(
res
));
curWeb
&&
getWebconfig
(
curWeb
.
text
).
then
(
res
=>
{
setConfigObj
(
res
);
setToEdit
(
res
);
});
},
[
curWeb
]);
const
renderTabPane
=
tabPaneItem
=>
(
...
...
src/utils/request/index.js
View file @
e3d514ba
...
...
@@ -100,11 +100,7 @@ export const request = (config, ctx) => {
requestOptions
=
bizRequestAdapter
(
requestOptions
);
}
return
axios
(
requestOptions
).
then
(
r
=>
{
console
.
log
(
r
)
return
r
})
.
then
(
raw
=>
raw
&&
raw
.
data
)
return
axios
(
requestOptions
).
then
(
raw
=>
raw
&&
raw
.
data
)
.
then
(
res
=>
new
Promise
((
resolve
,
reject
)
=>
{
...
...
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