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
d233a8b8
Commit
d233a8b8
authored
Oct 09, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 路由按需加载
parent
76477a88
Pipeline
#61453
waiting for manual action with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
index.less
src/pages/productCenter/mobileConfig/index.less
+13
-0
importComponent.js
src/routes/importComponent.js
+25
-0
No files found.
src/pages/productCenter/mobileConfig/index.less
0 → 100644
View file @
d233a8b8
.mobileContainer {
height: 100%;
.ant-tabs {
height: 100%;
.ant-tabs-content {
height: 100%;
}
}
.ant-pro-card {
height: 100%;
}
}
\ No newline at end of file
src/routes/importComponent.js
0 → 100644
View file @
d233a8b8
import
React
from
'react'
;
export
default
function
asyncComponent
(
importComponent
)
{
class
AsyncComponent
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
component
:
null
};
}
componentDidMount
()
{
importComponent
().
then
(
mod
=>
{
this
.
setState
({
component
:
mod
.
default
?
mod
.
default
:
mod
,
});
});
}
render
()
{
const
C
=
this
.
state
.
component
;
return
C
?
<
C
{...
this
.
props
}
/> : null
;
}
}
return
AsyncComponent
;
}
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