Commit 4d8a2026 authored by 邓晓峰's avatar 邓晓峰

fix: 修复样式隔离

parent a0671062
Pipeline #35612 passed with stages
...@@ -46,7 +46,8 @@ module.exports = { ...@@ -46,7 +46,8 @@ module.exports = {
if ( if (
context.resourcePath.includes('node_modules') || context.resourcePath.includes('node_modules') ||
context.resourcePath.includes('ant.design.pro.less') || context.resourcePath.includes('ant.design.pro.less') ||
context.resourcePath.includes('global.less') context.resourcePath.includes('global.less') ||
context.resourcePath.includes('ThemeColor.less')
) { ) {
return localName; return localName;
} }
...@@ -59,7 +60,7 @@ module.exports = { ...@@ -59,7 +60,7 @@ module.exports = {
.split('/') .split('/')
.map(a => a.replace(/([A-Z])/g, '-$1')) .map(a => a.replace(/([A-Z])/g, '-$1'))
.map(a => a.toLowerCase()); .map(a => a.toLowerCase());
return `panda-pro${arr.join('-')}-${localName}`.replace( return `panda-console-base${arr.join('-')}-${localName}`.replace(
/--/g, /--/g,
'-', '-',
); );
...@@ -68,5 +69,13 @@ module.exports = { ...@@ -68,5 +69,13 @@ module.exports = {
}, },
}, },
}, },
lessLoader: {
modifyVars: {
// hack: `true; @import "~@/global.less";`,
'@ant-prefix': 'panda-console-base',
'@iconPrefixCls': 'panda-console-base-icon'
},
javascriptEnabled: true
},
esbuild: {} esbuild: {}
}; };
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -13,7 +13,7 @@ import React from 'react'; ...@@ -13,7 +13,7 @@ import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { import {
Button, Button, ConfigProvider,
message, message,
notification, notification,
} from 'antd'; } from 'antd';
...@@ -64,7 +64,9 @@ const render = () => { ...@@ -64,7 +64,9 @@ const render = () => {
<LocaleContainer> <LocaleContainer>
<ErrorBoundary> <ErrorBoundary>
<Container> <Container>
<ConfigProvider prefixCls="panda-console-base">
<App /> <App />
</ConfigProvider>
</Container> </Container>
</ErrorBoundary> </ErrorBoundary>
</LocaleContainer> </LocaleContainer>
...@@ -175,7 +177,9 @@ const initGlobalConfig = () => { ...@@ -175,7 +177,9 @@ const initGlobalConfig = () => {
}) })
// eslint-disable-next-line no-shadow // eslint-disable-next-line no-shadow
.then(res => { .then(res => {
// eslint-disable-next-line no-use-before-define
initSensorType(); initSensorType();
// eslint-disable-next-line no-use-before-define
initIsMock(); initIsMock();
render({ appContent: '', loading: true }); render({ appContent: '', loading: true });
}) })
......
...@@ -225,10 +225,10 @@ const GlobalHeaderRight = props => { ...@@ -225,10 +225,10 @@ const GlobalHeaderRight = props => {
<FavitorIcon></FavitorIcon> <FavitorIcon></FavitorIcon>
<span>常用</span> <span>常用</span>
</div> </div>
<div className={classNames(styles.item)} onClick={handlerTheme}> {/*<div className={classNames(styles.item)} onClick={handlerTheme}>*/}
<ThemeIcon/> {/* <ThemeIcon/>*/}
<span>主题</span> {/* <span>主题</span>*/}
</div> {/*</div>*/}
<div className={classNames(styles.item)}> <div className={classNames(styles.item)}>
<OrderIcon onClick={handleOrder} title={intl.formatMessage({id: 'component.header.icon.order'})} /> <OrderIcon onClick={handleOrder} title={intl.formatMessage({id: 'component.header.icon.order'})} />
<span>工单</span> <span>工单</span>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
} }
} }
.extendsearch { .extendsearch {
& :global(.ant-input-affix-wrapper) { & :global(.@{ant-prefix}-input-affix-wrapper) {
padding: 3px 11px!important; padding: 3px 11px!important;
background: #fff; background: #fff;
} }
...@@ -591,12 +591,12 @@ ...@@ -591,12 +591,12 @@
display: flex; display: flex;
width: 100%; width: 100%;
:global { :global {
.ant-form-item { .@{ant-prefix}-form-item {
&:first-child { &:first-child {
width: 55%; width: 55%;
} }
} }
.ant-btn { .@{ant-prefix}-btn {
border-color: transparent; border-color: transparent;
background: url(https://panda-water.com/web4/assets/images/message/提交.png) center center / 100% 100% no-repeat; background: url(https://panda-water.com/web4/assets/images/message/提交.png) center center / 100% 100% no-repeat;
width: 249px; width: 249px;
...@@ -607,10 +607,10 @@ ...@@ -607,10 +607,10 @@
} }
} }
:global { :global {
.ant-form { .@{ant-prefix}-form {
.ant-form-item { .@{ant-prefix}-form-item {
margin-bottom: 8px!important; margin-bottom: 8px!important;
.ant-input { .@{ant-prefix}-input {
border-radius: 4px!important; border-radius: 4px!important;
background: #FFFEEC!important; background: #FFFEEC!important;
border: 1px solid #ffe59f; border: 1px solid #ffe59f;
...@@ -625,10 +625,10 @@ ...@@ -625,10 +625,10 @@
} }
} }
:global { :global {
.ant-modal-content { .@{ant-prefix}-modal-content {
background-color: transparent!important; background-color: transparent!important;
box-shadow: none!important; box-shadow: none!important;
.ant-modal-close { .@{ant-prefix}-modal-close {
display: none!important; display: none!important;
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
border-radius: 0; border-radius: 0;
transition: width 0.3s, margin-left 0.3s; transition: width 0.3s, margin-left 0.3s;
:global(.ant-select-selection) { :global(.@{ant-prefix}-select-selection) {
background: transparent; background: transparent;
} }
input { input {
...@@ -32,15 +32,15 @@ ...@@ -32,15 +32,15 @@
} }
} }
:global { :global {
.ant-select-selection-search { .@{ant-prefix}-select-selection-search {
.ant-input-affix-wrapper { .@{ant-prefix}-input-affix-wrapper {
border: 1px solid #b1b9c7; border: 1px solid #b1b9c7;
border-radius: 28px; border-radius: 28px;
width: 320px !important; width: 320px !important;
color: #555555; color: #555555;
} }
} }
.ant-input-affix-wrapper { .@{ant-prefix}-input-affix-wrapper {
padding-right: 12px; padding-right: 12px;
width: 320px; width: 320px;
min-width: 120px; min-width: 120px;
...@@ -320,10 +320,10 @@ ...@@ -320,10 +320,10 @@
.searchOverfy { .searchOverfy {
box-sizing: border-box; box-sizing: border-box;
:global(.ant-popover-arrow) { :global(.@{ant-prefix}-popover-arrow) {
display: none; display: none;
} }
:global(.ant-popover-inner) { :global(.@{ant-prefix}-popover-inner) {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
......
...@@ -19,8 +19,6 @@ import getLocales, { getLanguage } from './locales'; ...@@ -19,8 +19,6 @@ import getLocales, { getLanguage } from './locales';
import { genStringToTheme } from './utils'; import { genStringToTheme } from './utils';
import LayoutSetting, { renderLayoutSettingItem } from './LayoutChange'; import LayoutSetting, { renderLayoutSettingItem } from './LayoutChange';
import RegionalSetting from './RegionalChange'; import RegionalSetting from './RegionalChange';
const Body = ({ children, prefixCls, title }) => ( const Body = ({ children, prefixCls, title }) => (
<div style={{ marginBottom: 24 }}> <div style={{ marginBottom: 24 }}>
<h3 className={`${prefixCls}-drawer-title`}>{title}</h3> <h3 className={`${prefixCls}-drawer-title`}>{title}</h3>
...@@ -53,7 +51,6 @@ export const getFormatMessage = () => { ...@@ -53,7 +51,6 @@ export const getFormatMessage = () => {
}; };
const updateTheme = (dark, color, publicPath = '/theme', hideMessageLoading) => { const updateTheme = (dark, color, publicPath = '/theme', hideMessageLoading) => {
debugger
if (typeof window === 'undefined' || !(window).umi_plugin_ant_themeVar) { if (typeof window === 'undefined' || !(window).umi_plugin_ant_themeVar) {
return; return;
} }
...@@ -260,7 +257,7 @@ const SettingDrawer = (props) => { ...@@ -260,7 +257,7 @@ const SettingDrawer = (props) => {
hideCopyButton, hideCopyButton,
getContainer, getContainer,
onSettingChange, onSettingChange,
prefixCls = 'ant-pro', prefixCls = 'panda-console-base-pro',
pathname = window.location.pathname, pathname = window.location.pathname,
disableUrlParams = false, disableUrlParams = false,
} = props; } = props;
......
@import '~antd/es/style/themes/default.less'; @import '~antd/es/style/themes/default.less';
@ant-pro-setting-drawer: ~'@{ant-prefix}-pro-setting-drawer'; @ant-pro-setting-drawer: ~'@{ant-prefix}-setting-drawer';
.@{ant-pro-setting-drawer} { .@{ant-pro-setting-drawer} {
&-content { &-content {
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
@primary-9: color(~`colorPalette('@{primary-color}', 9) `); // unused @primary-9: color(~`colorPalette('@{primary-color}', 9) `); // unused
@primary-10: color(~`colorPalette('@{primary-color}', 10) `); // unused @primary-10: color(~`colorPalette('@{primary-color}', 10) `); // unused
@slider-light: #fff; @slider-light: #fff;
@color-black: #fff;
.basicLayout * { .basicLayout * {
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -62,10 +63,10 @@ ...@@ -62,10 +63,10 @@
.sliderMenu { .sliderMenu {
flex: 1 1 0%; flex: 1 1 0%;
// overflow: hidden auto; // overflow: hidden auto;
ul { .menu {
position: relative; position: relative;
min-height: 100%; min-height: 100%;
li { .menu-item {
height: 74px; height: 74px;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -99,7 +100,7 @@ ...@@ -99,7 +100,7 @@
height: 22px; height: 22px;
opacity: 0.7; opacity: 0.7;
} }
span { .text {
display: block; display: block;
color: hsla(0,0%,100%,.65); color: hsla(0,0%,100%,.65);
padding-top: 4px; padding-top: 4px;
...@@ -110,6 +111,9 @@ ...@@ -110,6 +111,9 @@
opacity: 1; opacity: 1;
transition: opacity .3s cubic-bezier(.645,.045,.355,1),margin .3s,color .3s; transition: opacity .3s cubic-bezier(.645,.045,.355,1),margin .3s,color .3s;
} }
.currentText {
color: @color-black;
}
} }
&:hover { &:hover {
span { span {
...@@ -188,7 +192,7 @@ ...@@ -188,7 +192,7 @@
margin-top: 82px; margin-top: 82px;
} }
} }
.ant-page-header { .@{ant-prefix}-page-header {
// padding: 4px 16px; // padding: 4px 16px;
position: fixed; top: 0px; width: 100%; left: 0px; z-index: 999; position: fixed; top: 0px; width: 100%; left: 0px; z-index: 999;
// box-shadow: rgb(240, 241, 242) 0px 2px 8px; // box-shadow: rgb(240, 241, 242) 0px 2px 8px;
...@@ -236,7 +240,7 @@ ...@@ -236,7 +240,7 @@
font-family: PangMenZhengDaoBiaoTiTi; font-family: PangMenZhengDaoBiaoTiTi;
letter-spacing: 2px; letter-spacing: 2px;
} }
:global(.ant-spin-container::after) { :global(.@{ant-prefix}-spin-container::after) {
background: transparent!important; background: transparent!important;
} }
.toggleSite { .toggleSite {
...@@ -304,7 +308,7 @@ ...@@ -304,7 +308,7 @@
} }
& :global { & :global {
.ant-tabs-tab { .@{ant-prefix}-tabs-tab {
padding: 7px 0!important; padding: 7px 0!important;
margin: 0 32px 0 0!important; margin: 0 32px 0 0!important;
&:hover { &:hover {
...@@ -328,23 +332,23 @@ ...@@ -328,23 +332,23 @@
.menu-item { .menu-item {
float: left; float: left;
} }
& :global(.ant-tabs-tab) { & :global(.@{ant-prefix}-tabs-tab) {
display: flex!important; display: flex!important;
} }
& :global(.ant-tabs-tab-btn) { & :global(.@{ant-prefix}-tabs-tab-btn) {
display: flex; display: flex;
position: relative; position: relative;
align-items: center; align-items: center;
color: #737983; color: #737983;
transform: scale(0.92); transform: scale(0.92);
} }
& :global(.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn) { & :global(.@{ant-prefix}-tabs-tab.@{ant-prefix}-tabs-tab-active .@{ant-prefix}-tabs-tab-btn) {
color: @primary-color!important; color: @primary-color!important;
} }
& :global(.ant-tabs-tab-btn>div>div) { & :global(.@{ant-prefix}-tabs-tab-btn>div>div) {
display: flex; display: flex;
} }
& :global(.ant-tabs-nav::before) { & :global(.@{ant-prefix}-tabs-nav::before) {
border-bottom: none!important; border-bottom: none!important;
} }
...@@ -358,50 +362,50 @@ ...@@ -358,50 +362,50 @@
} }
} }
& :global { & :global {
.ant-divider-vertical { .@{ant-prefix}-divider-vertical {
left: 20px; left: 20px;
margin: 0 1px!important; margin: 0 1px!important;
} }
.ant-tabs-nav-operations { .@{ant-prefix}-tabs-nav-operations {
.ant-tabs-nav-more { .ant-tabs-nav-more {
margin-right: 0px!important; margin-right: 0px!important;
} }
} }
} }
& :global(.ant-tabs-ink-bar) { & :global(.@{ant-prefix}-tabs-ink-bar) {
background: @primary-color!important; background: @primary-color!important;
} }
& :global(.ant-tabs-tab-active) { & :global(.@{ant-prefix}-tabs-tab-active) {
color: @primary-color!important; color: @primary-color!important;
} }
& :global(.ant-tabs-tab-active .panda-pro-layouts-basic-layout-menu-item-name) { & :global(.@{ant-prefix}-tabs-tab-active .panda-pro-layouts-basic-layout-menu-item-name) {
color: @primary-color!important; color: @primary-color!important;
} }
& :global { & :global {
.ant-tabs-tab-active svg path, .ant-tabs-tab-active svg rect, .ant-tabs-tab-active svg circle { .@{ant-prefix}-tabs-tab-active svg path, .@{ant-prefix}-tabs-tab-active svg rect, .@{ant-prefix}-tabs-tab-active svg circle {
fill: @primary-color!important; fill: @primary-color!important;
stroke: @primary-color!important; stroke: @primary-color!important;
} }
.ant-tabs-tab-active img { .@{ant-prefix}-tabs-tab-active img {
filter: drop-shadow(10px 0px @primary-color); filter: drop-shadow(10px 0px @primary-color);
} }
} }
& :global(.ant-tabs-nav-wrap) { & :global(.@{ant-prefix}-tabs-nav-wrap) {
margin-left: 22px; margin-left: 22px;
} }
& :global(.ant-dropdown-trigger) { & :global(.@{ant-prefix}-dropdown-trigger) {
display: flex; display: flex;
align-items: center; align-items: center;
} }
& :global(.ant-tabs-nav) { & :global(.@{ant-prefix}-tabs-nav) {
margin: 0px!important; margin: 0px!important;
} }
} }
.ant-page-container { .@{ant-prefix}-page-container {
// padding-top: 48px; // padding-top: 48px;
// margin: -24px -24px 0; // margin: -24px -24px 0;
// margin: -18px 0px 0 0px; // margin: -18px 0px 0 0px;
...@@ -410,11 +414,11 @@ ...@@ -410,11 +414,11 @@
// background-color: #fff; // background-color: #fff;
} }
.ant-pro-page-container-warp { .@{ant-prefix}-page-container-warp {
background-color: #fff; background-color: #fff;
} }
.ant-pro-page-container-children-content { .@{ant-prefix}-page-container-children-content {
margin: 0!important; margin: 0!important;
} }
& :global { & :global {
...@@ -445,7 +449,7 @@ ...@@ -445,7 +449,7 @@
} }
& :global { & :global {
.ant-dropdown-menu-item { .@{ant-prefix}-dropdown-menu-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -476,8 +480,8 @@ ...@@ -476,8 +480,8 @@
} }
} }
} }
.ant-dropdown-menu { .@{ant-prefix}-dropdown-menu {
.ant-divider-horizontal{ .@{ant-prefix}-divider-horizontal{
&:last-child { &:last-child {
display: none; display: none;
} }
...@@ -485,7 +489,7 @@ ...@@ -485,7 +489,7 @@
} }
} }
& :global { & :global {
.ant-dropdown-custom-menu { .@{ant-prefix}-dropdown-custom-menu {
top: 92px!important; top: 92px!important;
} }
} }
...@@ -350,6 +350,11 @@ const BasicLayout = props => { ...@@ -350,6 +350,11 @@ const BasicLayout = props => {
]) ])
}); });
window.share && window.share.event.on('event:microError', event => {
// window.history.pushState({message: '应用服务请求异常,请检查应用配置'}, null, '/civbase/404')
history.push('/404');
});
useEffect(() => { useEffect(() => {
window.share.event.on('updateSite', res => setCityData(res)); window.share.event.on('updateSite', res => setCityData(res));
return () => { return () => {
...@@ -482,34 +487,34 @@ const BasicLayout = props => { ...@@ -482,34 +487,34 @@ const BasicLayout = props => {
})}> })}>
<div className={layoutStyles['layout-slider-childern']}> <div className={layoutStyles['layout-slider-childern']}>
<div className={layoutStyles.sliderMenu} style={{flex: '1 1 0%', overflow: 'hidden auto'}}> <div className={layoutStyles.sliderMenu} style={{flex: '1 1 0%', overflow: 'hidden auto'}}>
<ul className="menu" style={{minHeight: '0px', marginBottom: '0px'}}> <ul className={classNames(layoutStyles.menu)} style={{minHeight: '0px', marginBottom: '0px'}}>
<li className={classNames('menu-item')} onClick={handleToggleSystem}> <li className={classNames(layoutStyles['menu-item'])} onClick={handleToggleSystem}>
<Tooltip placement="right" title={collapse ? currentRoutes.name: ''}> <Tooltip placement="right" title={collapse ? currentRoutes.name: ''}>
<a> <a>
{ {
(currentRoutes && currentRoutes.extData && currentRoutes.extData.icon) && <img src={currentRoutes.extData.icon} /> (currentRoutes && currentRoutes.extData && currentRoutes.extData.icon) && <img src={currentRoutes.extData.icon} />
} }
{ {
collapse ? null: <span>{currentRoutes && currentRoutes.name}</span> collapse ? null: <span className={classNames(layoutStyles.text, layoutStyles.currentText)}>{currentRoutes && currentRoutes.name}</span>
} }
</a> </a>
</Tooltip> </Tooltip>
</li> </li>
</ul> </ul>
<div className={layoutStyles.splitLine}></div> <div className={layoutStyles.splitLine}></div>
<ul className="menu menu-vertical"> <ul className={classNames(layoutStyles.menu, 'menu-vertical')}>
{ {
currentRoutes && (currentRoutes.routes || []).map((item, index) => { currentRoutes && (currentRoutes.routes || []).map((item, index) => {
return ( return (
<> <>
<li key={index} className={classNames("menu-item", { [layoutStyles['active']]: index === selectIndex })} onClick={() => handlerSecond(item, index)}> <li key={index} className={classNames(layoutStyles['menu-item'], { [layoutStyles['active']]: index === selectIndex })} onClick={() => handlerSecond(item, index)}>
<Tooltip placement="right" title={collapse ? item.name: ''}> <Tooltip placement="right" title={collapse ? item.name: ''}>
<a> <a>
{ {
item.icon ? item.icon: item.extData && /.svg/.test(item.extData.icon) ? <ReactSVG src={item.extData.icon} style={{width: '20px', height: '20px'}} className={layoutStyles.icon}/>: item.extData && <img src={item.extData.icon} /> item.icon ? item.icon: item.extData && /.svg/.test(item.extData.icon) ? <ReactSVG src={item.extData.icon} style={{width: '20px', height: '20px'}} className={layoutStyles.icon}/>: item.extData && <img src={item.extData.icon} />
} }
{ {
collapse ? item.extData && <span>{(item.extData.shortName || item.name).substr(0, 2)}</span>: <span>{item.name}</span> collapse ? item.extData && <span className={classNames(layoutStyles.text)}>{(item.extData.shortName || item.name).substr(0, 2)}</span>: <span className={classNames(layoutStyles.text)}>{item.name}</span>
} }
</a> </a>
</Tooltip> </Tooltip>
...@@ -555,9 +560,9 @@ const BasicLayout = props => { ...@@ -555,9 +560,9 @@ const BasicLayout = props => {
[layoutStyles['hook_web4']]: location.pathname.startsWith('/civbase/civweb4') [layoutStyles['hook_web4']]: location.pathname.startsWith('/civbase/civweb4')
})}> })}>
<div className={layoutStyles['ant-page-container']} style={{paddingTop: '0px'}}> <div className={layoutStyles[`${props.rootPrefix}-page-container`]} style={{paddingTop: '0px'}}>
<div className={layoutStyles['ant-pro-page-container-warp']}> <div className={layoutStyles[`${props.rootPrefix}-page-container-warp`]}>
<div className={layoutStyles['ant-page-header']} style={{position: 'fixed'}}> <div className={layoutStyles[`${props.rootPrefix}-page-header`]} style={{position: 'fixed'}}>
<img src={require('../assets/basic/图层 998@2x.png')} style={{width: '100%'}}/> <img src={require('../assets/basic/图层 998@2x.png')} style={{width: '100%'}}/>
<div className={layoutStyles.header}> <div className={layoutStyles.header}>
<a className={layoutStyles.logo} onClick={handlerIndustry}> <a className={layoutStyles.logo} onClick={handlerIndustry}>
......
...@@ -162,9 +162,11 @@ export const initMicroApps = (loader, store) => { ...@@ -162,9 +162,11 @@ export const initMicroApps = (loader, store) => {
// ) { // ) {
// // window.history.pushState({message: '应用服务请求异常,请检查应用配置'}, null, '/civbase/500') // // window.history.pushState({message: '应用服务请求异常,请检查应用配置'}, null, '/civbase/500')
// } // }
// if(event.type === 'error') { console.log(event);
if(event.type === 'error') {
// window.history.pushState({message: '应用服务请求异常,请检查应用配置'}, null, '/civbase/404') // window.history.pushState({message: '应用服务请求异常,请检查应用配置'}, null, '/civbase/404')
// } window.share && window.share.event.emit('event:microError');
}
}); });
}; };
......
...@@ -19,7 +19,9 @@ import starIcon from '../../assets/images/commonMenu/矢量智能对象 拷贝 3 ...@@ -19,7 +19,9 @@ import starIcon from '../../assets/images/commonMenu/矢量智能对象 拷贝 3
// 是否是灰色的图标(灰色图标在白色背景中看不见,添加滤镜变色) // 是否是灰色的图标(灰色图标在白色背景中看不见,添加滤镜变色)
const isNeedFilterIcon = (icon = '') => const isNeedFilterIcon = (icon = '') =>
icon && !icon.includes('一级') && !icon.includes('ios/'); icon && !icon.includes('一级') && !icon.includes('ios/');
Modal.config({
rootPrefixCls: 'panda-console-base'
});
const CommonMenu = props => { const CommonMenu = props => {
const history = useHistory(); const history = useHistory();
const { menus } = props; const { menus } = props;
...@@ -215,7 +217,7 @@ const CommonMenu = props => { ...@@ -215,7 +217,7 @@ const CommonMenu = props => {
return ( return (
<div className={styles.commonMenu}> <div className={styles.commonMenu}>
<Spin spinning={loading}> <Spin spinning={loading} style={{height: '100%'}}>
<div className={styles.searchWrapper}> <div className={styles.searchWrapper}>
<div className={styles.searchBox}> <div className={styles.searchBox}>
<div className={styles.searchTitle}> <div className={styles.searchTitle}>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
p { p {
margin: 0; margin: 0;
} }
.ant-spin-nested-loading { .@{ant-prefix}-spin-nested-loading, .@{ant-prefix}-spin-container {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
...@@ -81,16 +81,16 @@ ...@@ -81,16 +81,16 @@
height: 0; height: 0;
} }
:global { :global {
.ant-tree-treenode { .@{ant-prefix}-tree-treenode {
width: 100%; width: 100%;
} }
.ant-tree-node-content-wrapper, .@{ant-prefix}-tree-node-content-wrapper,
.ant-tree-node-content-wrapper-normal .@{ant-prefix}-tree-node-content-wrapper-normal
.ant-tree-node-content-wrapper-close { .@{ant-prefix}-tree-node-content-wrapper-close {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
} }
.ant-tree-switcher { .@{ant-prefix}-tree-switcher {
line-height: 36px; line-height: 36px;
} }
} }
...@@ -237,15 +237,15 @@ ...@@ -237,15 +237,15 @@
.MenuModal { .MenuModal {
:global { :global {
.ant-modal-header { .@{ant-prefix}-modal-header {
padding: 0 16px; padding: 0 16px;
background: url('../../assets/basic/图层\ 998@2x.png') center/100% 100% background: url('../../assets/basic/图层\ 998@2x.png') center/100% 100%
no-repeat; no-repeat;
.ant-modal-title { .@{ant-prefix}-modal-title {
height: 56px; height: 56px;
} }
} }
.ant-modal-close { .@{ant-prefix}-modal-close {
color: #fff; color: #fff;
} }
} }
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
padding: 20px 30px; padding: 20px 30px;
// color: red; // color: red;
:global { :global {
.ant-input-affix-wrapper { .@{ant-prefix}-input-affix-wrapper {
border-radius: 20px; border-radius: 20px;
} }
} }
......
...@@ -71,6 +71,26 @@ export const dyRoutes = routes => { ...@@ -71,6 +71,26 @@ export const dyRoutes = routes => {
loading: LoadingComponent, loading: LoadingComponent,
}), }),
}, },
{
path: '/404',
component: dynamic({
loader: () =>
import(
/* webpackChunkName: 'p__404' */ '../pages/exception/404'
),
loading: LoadingComponent,
}),
},
{
path: '/500',
component: dynamic({
loader: () =>
import(
/* webpackChunkName: 'p__500' */ '../pages/exception/500'
),
loading: LoadingComponent,
}),
},
], ],
}; };
......
...@@ -191,11 +191,13 @@ function renderRoutes(routes, extraProps, switchProps) { ...@@ -191,11 +191,13 @@ function renderRoutes(routes, extraProps, switchProps) {
return route.render ? route.render(Object.assign({}, props, {}, extraProps, { return route.render ? route.render(Object.assign({}, props, {}, extraProps, {
routes: route.routes, routes: route.routes,
params: route.params, params: route.params,
route: route route: route,
rootPrefix: 'panda-console-base'
})) : React.createElement(route.component, Object.assign({}, props, extraProps, { })) : React.createElement(route.component, Object.assign({}, props, extraProps, {
route: route, route: route,
routes: route.routes, routes: route.routes,
params: route.params, params: route.params,
rootPrefix: 'panda-console-base'
})); }));
} }
}); });
......
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