Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
8e28420e
Commit
8e28420e
authored
Sep 03, 2018
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix top style error
parent
0b33f922
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
6 deletions
+11
-6
config/config.js
config/config.js
+3
-0
package.json
package.json
+2
-2
src/components/TopNavHeader/index.js
src/components/TopNavHeader/index.js
+2
-2
src/models/setting.js
src/models/setting.js
+4
-2
No files found.
config/config.js
View file @
8e28420e
...
@@ -32,6 +32,9 @@ export default {
...
@@ -32,6 +32,9 @@ export default {
},
},
],
],
],
],
define
:
{
APP_TYPE
:
process
.
env
.
APP_TYPE
,
},
// 路由配置
// 路由配置
routes
:
pageRoutes
,
routes
:
pageRoutes
,
// Theme for antd
// Theme for antd
...
...
package.json
View file @
8e28420e
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
"scripts"
:
{
"scripts"
:
{
"precommit"
:
"npm run lint-staged"
,
"precommit"
:
"npm run lint-staged"
,
"presite"
:
"npm run generate-mock && cd functions && npm install"
,
"presite"
:
"npm run generate-mock && cd functions && npm install"
,
"start"
:
"umi dev"
,
"start"
:
"
APP_TYPE=site
umi dev"
,
"start:no-mock"
:
"cross-env MOCK=none umi dev"
,
"start:no-mock"
:
"cross-env MOCK=none umi dev"
,
"build"
:
"umi build"
,
"build"
:
"umi build"
,
"site"
:
"npm run presite && npm run build && firebase deploy"
,
"site"
:
"npm run presite &&
APP_TYPE=site
npm run build && firebase deploy"
,
"analyze"
:
"cross-env ANALYZE=1 umi build"
,
"analyze"
:
"cross-env ANALYZE=1 umi build"
,
"lint:style"
:
"stylelint
\"
src/**/*.less
\"
--syntax less"
,
"lint:style"
:
"stylelint
\"
src/**/*.less
\"
--syntax less"
,
"lint"
:
"eslint --ext .js src mock tests && npm run lint:style"
,
"lint"
:
"eslint --ext .js src mock tests && npm run lint:style"
,
...
...
src/components/TopNavHeader/index.js
View file @
8e28420e
...
@@ -9,13 +9,13 @@ export default class TopNavHeader extends PureComponent {
...
@@ -9,13 +9,13 @@ export default class TopNavHeader extends PureComponent {
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
maxWidth
:
(
props
.
contentWidth
===
'
Fixed
'
?
1200
:
window
.
innerWidth
)
-
3
24
-
165
-
4
,
maxWidth
:
(
props
.
contentWidth
===
'
Fixed
'
?
1200
:
window
.
innerWidth
)
-
3
30
-
165
-
4
,
};
};
}
}
static
getDerivedStateFromProps
(
props
)
{
static
getDerivedStateFromProps
(
props
)
{
return
{
return
{
maxWidth
:
(
props
.
contentWidth
===
'
Fixed
'
?
1200
:
window
.
innerWidth
)
-
3
24
-
165
-
4
,
maxWidth
:
(
props
.
contentWidth
===
'
Fixed
'
?
1200
:
window
.
innerWidth
)
-
3
30
-
165
-
4
,
};
};
}
}
...
...
src/models/setting.js
View file @
8e28420e
...
@@ -3,10 +3,12 @@ import defaultSettings from '../defaultSettings';
...
@@ -3,10 +3,12 @@ import defaultSettings from '../defaultSettings';
let
lessNodesAppended
;
let
lessNodesAppended
;
const
updateTheme
=
primaryColor
=>
{
const
updateTheme
=
primaryColor
=>
{
// Don't compile less in production!
// // Don't compile less in production!
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
/* eslint-disable */
if
(
APP_TYPE
!==
'
site
'
)
{
return
;
return
;
}
}
/* eslint-disable */
// Determine if the component is remounted
// Determine if the component is remounted
if
(
!
primaryColor
)
{
if
(
!
primaryColor
)
{
return
;
return
;
...
...
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