Commit bb6dbdc8 authored by 邓晓峰's avatar 邓晓峰

fix: 修复计算容器高度

parent fd2317b0
Pipeline #35101 passed with stages
in 31 minutes 34 seconds
......@@ -11,7 +11,7 @@ export default {
},
{
name: 'civ_water',
entry: `//${window.location.hostname}:8083/civ_water`,
entry: `//${window.location.hostname}:8080/civ_water`,
container: '#micro-container',
activeRule: '/civbase/civ_water',
},
......
import React, { Suspense } from 'react';
import React from 'react';
import { Helmet } from 'react-helmet';
import { connect } from 'react-redux';
import { RouteWithSubRoutes, renderRoutes } from '../../utils/routes';
// import { renderRoutes } from 'react-router-config';
import { RouteWithSubRoutes, renderRoutes} from '../../utils/routes'
import BootPage from '../../pages/bootpage';
import {
Router,
Switch,
} from '@wisdom-utils/runtime';
import { dyRoutes } from '../../routes/config';
import { Route } from 'react-router-dom';
const pkg = require('../../../package.json');
const config = require('../../../config/config');
......@@ -35,12 +38,15 @@ function App(props) {
</Helmet>
<Router basename={config.base || pkg.name.toLocaleLowerCase() || ''}>
<Switch>
{
{renderRoutes(routes, [])}
{/* <Route path="/industry" component={BootPage}></Route> */}
{/* <Redirect to="/notFound" /> */}
{/* {
routes.map((route, key) => (
<RouteWithSubRoutes key={key} {...route} />
))
// resultRoutes
}
} */}
</Switch>
</Router>
</>
......
......@@ -42,7 +42,7 @@
left: 0;
z-index: 600;
height: calc(100% - 46px);
overflow: auto;
// overflow: auto;
overflow-x: hidden;
box-shadow: 2px 0 8px 0 rgb(29 35 41 / 5%);
transition: all .2s;
......@@ -61,7 +61,7 @@
}
.sliderMenu {
flex: 1 1 0%;
overflow: hidden auto;
// overflow: hidden auto;
ul {
position: relative;
min-height: 100%;
......@@ -180,6 +180,10 @@
.basicLayout-content {
position: relative;
// margin: 24px 24px 0px 24px;
&.hook_web4 {
height: calc(100% - 82px);
margin-top: 98px;
}
}
.ant-page-header {
// padding: 4px 16px;
......@@ -299,6 +303,7 @@
& :global {
.ant-tabs-tab {
padding: 7px 0!important;
margin: 0 32px 0 0!important;
&:hover {
svg path, svg rect, svg circle {
fill: @primary-color!important;
......@@ -406,6 +411,9 @@
.ant-pro-page-container-children-content {
margin: 0!important;
}
& :global(.ant-pro-page-container-children-content) {
margin: 14px 10px!important
}
.fixedHeader {
position: fixed;
......
......@@ -20,6 +20,7 @@ import {
Tooltip
} from 'antd';
import { RouteWithSubRoutes, renderRoutes } from '../utils/routes';
import { PageContainer } from '@ant-design/pro-layout';
import Icon from '@ant-design/icons';
import { store } from 'microser-data';
import classNames from 'classnames';
......@@ -524,7 +525,7 @@ const BasicLayout = props => {
</div>
</div>
</aside>
<div className={layoutStyles.layout}>
<div className={layoutStyles.layout} style={{width: 'calc(100% - 100px)'}}>
<Panel
visible={toggleSystem}
keyboard
......@@ -538,7 +539,9 @@ const BasicLayout = props => {
onSettingChange={config => updateSettings(config)}
publicPath={`${window.location.origin}/${basename}/theme`}
/>
<div className={layoutStyles['basicLayout-content']}>
<div className={classNames(layoutStyles['basicLayout-content'], {
[layoutStyles['hook_web4']]: location.pathname.startsWith('/civbase/civweb4')
})}>
<div className={layoutStyles['ant-page-container']} style={{paddingTop: '46px'}}>
<div className={layoutStyles['ant-pro-page-container-warp']}>
<div className={layoutStyles['ant-page-header']} style={{position: 'fixed'}}>
......@@ -562,7 +565,7 @@ const BasicLayout = props => {
</div>
</div>
<div className={layoutStyles['menu-item-children']} style={{width: collapse ? 'calc(100% - 46px)': 'calc(100% - 100px)'}}>
<div className={layoutStyles['menu-item-children']}>
<Tabs activeKey={tabActiveKey} defaultActiveKey={tabActiveKey} tabBarGutter={30} tabPosition="top" onTabClick={(event) => handleSelectMenuItem(event)}>
{childrenRoutes.map((item, index) => (
<>
......@@ -594,7 +597,7 @@ const BasicLayout = props => {
</Tabs>
</div>
<div className='ant-pro-grid-content'>
{/* <div className='ant-pro-grid-content' style={{width: collapse ? 'calc(100% - 56px)':'calc(100% - 18px)'}}>
<div className="ant-pro-grid-content-children">
<div className={layoutStyles['ant-pro-page-container-children-content']}>
......@@ -608,7 +611,17 @@ const BasicLayout = props => {
}
</div>
</div>
</div>
</div> */}
<PageContainer style={{paddingTop: '48px'}}>
{
<div id="micro-container" className="subapp-container">
<Switch>
{props.routes && renderRoutes(props.routes, [])}
</Switch>
</div>
}
</PageContainer>
</div>
</div>
</div>
......
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