Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
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
CivWeb
Commits
bb6dbdc8
Commit
bb6dbdc8
authored
Sep 23, 2021
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复计算容器高度
parent
fd2317b0
Pipeline
#35101
passed with stages
in 31 minutes 34 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
13 deletions
+40
-13
micor.js
config/micor.js
+1
-1
index.js
src/containers/App/index.js
+11
-5
BasicLayout.less
src/layouts/BasicLayout.less
+10
-2
BasicLayout1.js
src/layouts/BasicLayout1.js
+18
-5
No files found.
config/micor.js
View file @
bb6dbdc8
...
@@ -11,7 +11,7 @@ export default {
...
@@ -11,7 +11,7 @@ export default {
},
},
{
{
name
:
'civ_water'
,
name
:
'civ_water'
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
3
/civ_water`
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
0
/civ_water`
,
container
:
'#micro-container'
,
container
:
'#micro-container'
,
activeRule
:
'/civbase/civ_water'
,
activeRule
:
'/civbase/civ_water'
,
},
},
...
...
src/containers/App/index.js
View file @
bb6dbdc8
import
React
,
{
Suspense
}
from
'react'
;
import
React
from
'react'
;
import
{
Helmet
}
from
'react-helmet'
;
import
{
Helmet
}
from
'react-helmet'
;
import
{
connect
}
from
'react-redux'
;
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
{
import
{
Router
,
Router
,
Switch
,
Switch
,
}
from
'@wisdom-utils/runtime'
;
}
from
'@wisdom-utils/runtime'
;
import
{
dyRoutes
}
from
'../../routes/config'
;
import
{
dyRoutes
}
from
'../../routes/config'
;
import
{
Route
}
from
'react-router-dom'
;
const
pkg
=
require
(
'../../../package.json'
);
const
pkg
=
require
(
'../../../package.json'
);
const
config
=
require
(
'../../../config/config'
);
const
config
=
require
(
'../../../config/config'
);
...
@@ -35,12 +38,15 @@ function App(props) {
...
@@ -35,12 +38,15 @@ function App(props) {
<
/Helmet
>
<
/Helmet
>
<
Router
basename
=
{
config
.
base
||
pkg
.
name
.
toLocaleLowerCase
()
||
''
}
>
<
Router
basename
=
{
config
.
base
||
pkg
.
name
.
toLocaleLowerCase
()
||
''
}
>
<
Switch
>
<
Switch
>
{
{
renderRoutes
(
routes
,
[])}
{
/* <Route path="/industry" component={BootPage}></Route> */
}
{
/* <Redirect to="/notFound" /> */
}
{
/* {
routes.map((route, key) => (
routes.map((route, key) => (
<RouteWithSubRoutes key={key} {...route} />
<RouteWithSubRoutes key={key} {...route} />
))
))
// resultRoutes
} */
}
}
<
/Switch
>
<
/Switch
>
<
/Router
>
<
/Router
>
<
/
>
<
/
>
...
...
src/layouts/BasicLayout.less
View file @
bb6dbdc8
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
left: 0;
left: 0;
z-index: 600;
z-index: 600;
height: calc(100% - 46px);
height: calc(100% - 46px);
overflow: auto;
//
overflow: auto;
overflow-x: hidden;
overflow-x: hidden;
box-shadow: 2px 0 8px 0 rgb(29 35 41 / 5%);
box-shadow: 2px 0 8px 0 rgb(29 35 41 / 5%);
transition: all .2s;
transition: all .2s;
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
}
}
.sliderMenu {
.sliderMenu {
flex: 1 1 0%;
flex: 1 1 0%;
overflow: hidden auto;
//
overflow: hidden auto;
ul {
ul {
position: relative;
position: relative;
min-height: 100%;
min-height: 100%;
...
@@ -180,6 +180,10 @@
...
@@ -180,6 +180,10 @@
.basicLayout-content {
.basicLayout-content {
position: relative;
position: relative;
// margin: 24px 24px 0px 24px;
// margin: 24px 24px 0px 24px;
&.hook_web4 {
height: calc(100% - 82px);
margin-top: 98px;
}
}
}
.ant-page-header {
.ant-page-header {
// padding: 4px 16px;
// padding: 4px 16px;
...
@@ -299,6 +303,7 @@
...
@@ -299,6 +303,7 @@
& :global {
& :global {
.ant-tabs-tab {
.ant-tabs-tab {
padding: 7px 0!important;
padding: 7px 0!important;
margin: 0 32px 0 0!important;
&:hover {
&:hover {
svg path, svg rect, svg circle {
svg path, svg rect, svg circle {
fill: @primary-color!important;
fill: @primary-color!important;
...
@@ -406,6 +411,9 @@
...
@@ -406,6 +411,9 @@
.ant-pro-page-container-children-content {
.ant-pro-page-container-children-content {
margin: 0!important;
margin: 0!important;
}
}
& :global(.ant-pro-page-container-children-content) {
margin: 14px 10px!important
}
.fixedHeader {
.fixedHeader {
position: fixed;
position: fixed;
...
...
src/layouts/BasicLayout1.js
View file @
bb6dbdc8
...
@@ -20,6 +20,7 @@ import {
...
@@ -20,6 +20,7 @@ import {
Tooltip
Tooltip
}
from
'antd'
;
}
from
'antd'
;
import
{
RouteWithSubRoutes
,
renderRoutes
}
from
'../utils/routes'
;
import
{
RouteWithSubRoutes
,
renderRoutes
}
from
'../utils/routes'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
Icon
from
'@ant-design/icons'
;
import
Icon
from
'@ant-design/icons'
;
import
{
store
}
from
'microser-data'
;
import
{
store
}
from
'microser-data'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
...
@@ -524,7 +525,7 @@ const BasicLayout = props => {
...
@@ -524,7 +525,7 @@ const BasicLayout = props => {
<
/div
>
<
/div
>
<
/div>
<
/div>
<
/aside
>
<
/aside
>
<
div
className
=
{
layoutStyles
.
layout
}
>
<
div
className
=
{
layoutStyles
.
layout
}
style
=
{{
width
:
'calc(100% - 100px)'
}}
>
<
Panel
<
Panel
visible
=
{
toggleSystem
}
visible
=
{
toggleSystem
}
keyboard
keyboard
...
@@ -538,7 +539,9 @@ const BasicLayout = props => {
...
@@ -538,7 +539,9 @@ const BasicLayout = props => {
onSettingChange
=
{
config
=>
updateSettings
(
config
)}
onSettingChange
=
{
config
=>
updateSettings
(
config
)}
publicPath
=
{
`
${
window
.
location
.
origin
}
/
${
basename
}
/theme`
}
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-page-container'
]}
style
=
{{
paddingTop
:
'46px'
}}
>
<
div
className
=
{
layoutStyles
[
'ant-pro-page-container-warp'
]}
>
<
div
className
=
{
layoutStyles
[
'ant-pro-page-container-warp'
]}
>
<
div
className
=
{
layoutStyles
[
'ant-page-header'
]}
style
=
{{
position
:
'fixed'
}}
>
<
div
className
=
{
layoutStyles
[
'ant-page-header'
]}
style
=
{{
position
:
'fixed'
}}
>
...
@@ -562,7 +565,7 @@ const BasicLayout = props => {
...
@@ -562,7 +565,7 @@ const BasicLayout = props => {
<
/div
>
<
/div
>
<
/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
)}
>
<
Tabs
activeKey
=
{
tabActiveKey
}
defaultActiveKey
=
{
tabActiveKey
}
tabBarGutter
=
{
30
}
tabPosition
=
"top"
onTabClick
=
{(
event
)
=>
handleSelectMenuItem
(
event
)}
>
{
childrenRoutes
.
map
((
item
,
index
)
=>
(
{
childrenRoutes
.
map
((
item
,
index
)
=>
(
<>
<>
...
@@ -594,7 +597,7 @@ const BasicLayout = props => {
...
@@ -594,7 +597,7 @@ const BasicLayout = props => {
<
/Tabs
>
<
/Tabs
>
<
/div
>
<
/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="ant-pro-grid-content-children">
<div className={layoutStyles['ant-pro-page-container-children-content']}>
<div className={layoutStyles['ant-pro-page-container-children-content']}>
...
@@ -608,7 +611,17 @@ const BasicLayout = props => {
...
@@ -608,7 +611,17 @@ const BasicLayout = props => {
}
}
</div>
</div>
</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
>
<
/div
>
<
/div
>
<
/div
>
...
...
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