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
54e288fe
Commit
54e288fe
authored
Dec 04, 2020
by
张烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 新增网站配置展示空配置
parent
296c6050
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
10 deletions
+28
-10
index.tsx
src/components/Upload/index.tsx
+9
-3
utils.js
src/pages/webConfig/utils.js
+19
-7
No files found.
src/components/Upload/index.tsx
View file @
54e288fe
...
...
@@ -70,11 +70,17 @@ class PicturesWall extends React.Component<PicturesWallType> {
}]
as
UploadFile
<
any
>
[]
:
[],
};
/**
* 判断value是否更新,若更新则更新state.fileList
* 判断imgBed是否更新,若更新则更新state.imgBed
* @param props
* @param state
*/
static
getDerivedStateFromProps
=
(
props
,
state
)
=>
{
const
{
value
,
uploadContext
=
{}}
=
props
;
const
{
imgBed
,
update
}
=
uploadContext
;
const
fileList
=
state
.
fileList
;
const
shouldUpdate
=
value
&&
fileList
.
every
(
f
=>
Array
.
isArray
(
value
)
?
!
value
.
some
(
v
=>
f
.
url
===
v
)
:
f
.
url
!==
value
)
const
shouldUpdate
=
fileList
.
every
(
f
=>
Array
.
isArray
(
value
)
?
!
value
.
some
(
v
=>
f
.
url
===
v
)
:
f
.
url
!==
value
)
if
(
value
!==
state
.
prevProps
.
value
&&
shouldUpdate
){
return
{
prevProps
:
props
,
...
...
@@ -83,12 +89,12 @@ class PicturesWall extends React.Component<PicturesWallType> {
uid
:
uuid
(
8
,
16
),
name
:
'熊猫运维中台系统'
,
status
:
'done'
,
}))
as
UploadFile
<
any
>
[]:
[{
}))
as
UploadFile
<
any
>
[]:
value
?
[{
url
:
value
,
uid
:
uuid
(
8
,
16
),
name
:
'熊猫运维中台系统'
,
status
:
'done'
,
}]
as
UploadFile
<
any
>
[]
}]
as
UploadFile
<
any
>
[]
:
[]
}
}
if
(
imgBed
!=
state
.
prevProps
.
uploadContext
?.
imgBed
){
...
...
src/pages/webConfig/utils.js
View file @
54e288fe
...
...
@@ -28,12 +28,12 @@ export const singleStyleData = {
webgis
:
'WEBGIS'
,
};
export
const
menuStyle
=
{
'banner-left'
:
'
标题栏-左
'
,
banner
:
'标题栏'
,
'banner-big'
:
'标题栏-大'
,
table
:
'左侧'
,
dock
:
'底部'
,
'banner-left-noShrink'
:
'标题栏-左-不收'
,
'banner-left'
:
'
经典
'
,
//
banner: '标题栏',
//
'banner-big': '标题栏-大',
//
table: '左侧',
//
dock: '底部',
//
'banner-left-noShrink': '标题栏-左-不收',
};
export
const
MDILabel
=
{
MDI
:
'多标签模式'
,
...
...
@@ -52,10 +52,22 @@ const isIntegerate = (mode, hasIntegerate) => {
};
export
const
defaultWebConfigObj
=
{
title
:
''
,
subtitle
:
''
,
mode
:
webMode
.
single
,
shortcutIcon
:
''
,
logo
:
''
,
client
:
''
,
bannerLogo
:
''
,
homePage
:
''
,
menu
:
'banner-left'
,
mdi
:
'MDI'
,
hideMap
:
true
,
theme
:
''
,
style
:
''
,
hideMap
:
false
,
waterMark
:
true
,
mapPlan
:
''
,
qrcode
:
''
,
loginTemplate
:
'Default.html'
,
};
...
...
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