Commit 54e288fe authored by 张烨's avatar 张烨

fix: 新增网站配置展示空配置

parent 296c6050
...@@ -70,11 +70,17 @@ class PicturesWall extends React.Component<PicturesWallType> { ...@@ -70,11 +70,17 @@ class PicturesWall extends React.Component<PicturesWallType> {
}] as UploadFile<any>[] : [], }] as UploadFile<any>[] : [],
}; };
/**
* 判断value是否更新,若更新则更新state.fileList
* 判断imgBed是否更新,若更新则更新state.imgBed
* @param props
* @param state
*/
static getDerivedStateFromProps = (props, state) => { static getDerivedStateFromProps = (props, state) => {
const {value, uploadContext = {}} = props; const {value, uploadContext = {}} = props;
const { imgBed, update } = uploadContext; const { imgBed, update } = uploadContext;
const fileList = state.fileList; 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){ if(value !== state.prevProps.value && shouldUpdate){
return { return {
prevProps: props, prevProps: props,
...@@ -83,12 +89,12 @@ class PicturesWall extends React.Component<PicturesWallType> { ...@@ -83,12 +89,12 @@ class PicturesWall extends React.Component<PicturesWallType> {
uid: uuid(8, 16), uid: uuid(8, 16),
name: '熊猫运维中台系统', name: '熊猫运维中台系统',
status: 'done', status: 'done',
})) as UploadFile<any>[]: [{ })) as UploadFile<any>[]: value? [{
url: value, url: value,
uid: uuid(8, 16), uid: uuid(8, 16),
name: '熊猫运维中台系统', name: '熊猫运维中台系统',
status: 'done', status: 'done',
}] as UploadFile<any>[] }] as UploadFile<any>[] : []
} }
} }
if(imgBed != state.prevProps.uploadContext?.imgBed){ if(imgBed != state.prevProps.uploadContext?.imgBed){
......
...@@ -28,12 +28,12 @@ export const singleStyleData = { ...@@ -28,12 +28,12 @@ export const singleStyleData = {
webgis: 'WEBGIS', webgis: 'WEBGIS',
}; };
export const menuStyle = { export const menuStyle = {
'banner-left': '标题栏-左', 'banner-left': '经典',
banner: '标题栏', // banner: '标题栏',
'banner-big': '标题栏-大', // 'banner-big': '标题栏-大',
table: '左侧', // table: '左侧',
dock: '底部', // dock: '底部',
'banner-left-noShrink': '标题栏-左-不收', // 'banner-left-noShrink': '标题栏-左-不收',
}; };
export const MDILabel = { export const MDILabel = {
MDI: '多标签模式', MDI: '多标签模式',
...@@ -52,10 +52,22 @@ const isIntegerate = (mode, hasIntegerate) => { ...@@ -52,10 +52,22 @@ const isIntegerate = (mode, hasIntegerate) => {
}; };
export const defaultWebConfigObj = { export const defaultWebConfigObj = {
title: '',
subtitle: '',
mode: webMode.single, mode: webMode.single,
shortcutIcon: '',
logo: '',
client: '',
bannerLogo: '',
homePage: '',
menu: 'banner-left', menu: 'banner-left',
mdi: 'MDI', mdi: 'MDI',
hideMap: true, theme: '',
style: '',
hideMap: false,
waterMark: true,
mapPlan: '',
qrcode: '',
loginTemplate: 'Default.html', loginTemplate: 'Default.html',
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment