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
P
pro-blocks
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
pro-blocks
Commits
677621d7
Commit
677621d7
authored
Jul 04, 2018
by
愚道
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mv index.* to global.*
parent
fc442755
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
61 deletions
+70
-61
src/global.js
src/global.js
+31
-0
src/global.less
src/global.less
+33
-0
src/index.js
src/index.js
+0
-29
src/index.less
src/index.less
+0
-31
src/utils/request.js
src/utils/request.js
+6
-1
No files found.
src/global.js
0 → 100644
View file @
677621d7
import
'
./polyfill
'
;
// TODO remove
// import dva from 'dva';
// import createHistory from 'history/createHashHistory';
// // user BrowserHistory
// // import createHistory from 'history/createBrowserHistory';
// import createLoading from 'dva-loading';
// import 'moment/locale/zh-cn';
// import './rollbar';
// import './index.less';
// // 1. Initialize
// const app = dva({
// history: createHistory(),
// });
// // 2. Plugins
// app.use(createLoading());
// // 3. Register global model
// app.model(require('./models/global').default);
// // 4. Router
// app.router(require('./router').default);
// // 5. Start
// app.start('#root');
// export default app._store; // eslint-disable-line
src/global.less
0 → 100644
View file @
677621d7
html,
body,
#root {
height: 100%;
}
.colorWeak {
filter: invert(80%);
}
.ant-layout {
min-height: 100vh;
}
canvas {
display: block;
}
body {
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.globalSpin {
width: 100%;
margin: 40px 0 !important;
}
// temp fix for https://github.com/ant-design/ant-design/commit/a1fafb5b727b62cb0be29ce6e9eca8f579d4f8b7
.ant-spin-container {
overflow: visible !important;
}
src/index.js
deleted
100644 → 0
View file @
fc442755
import
'
./polyfill
'
;
import
dva
from
'
dva
'
;
import
createHistory
from
'
history/createHashHistory
'
;
// user BrowserHistory
// import createHistory from 'history/createBrowserHistory';
import
createLoading
from
'
dva-loading
'
;
import
'
moment/locale/zh-cn
'
;
import
'
./rollbar
'
;
import
'
./index.less
'
;
// 1. Initialize
const
app
=
dva
({
history
:
createHistory
(),
});
// 2. Plugins
app
.
use
(
createLoading
());
// 3. Register global model
app
.
model
(
require
(
'
./models/global
'
).
default
);
// 4. Router
app
.
router
(
require
(
'
./router
'
).
default
);
// 5. Start
app
.
start
(
'
#root
'
);
export
default
app
.
_store
;
// eslint-disable-line
src/index.less
View file @
677621d7
html,
body,
:global(#root) {
height: 100%;
}
:global(.colorWeak) {
filter: invert(80%);
}
:global(.ant-layout) {
min-height: 100vh;
}
canvas {
display: block;
}
body {
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.globalSpin {
width: 100%;
margin: 40px 0 !important;
}
// temp fix for https://github.com/ant-design/ant-design/commit/a1fafb5b727b62cb0be29ce6e9eca8f579d4f8b7
:global {
.ant-spin-container {
overflow: visible !important;
}
}
src/utils/request.js
View file @
677621d7
import
fetch
from
'
dva/fetch
'
;
import
{
notification
}
from
'
antd
'
;
import
{
routerRedux
}
from
'
dva/router
'
;
import
store
from
'
../index
'
;
// TODO set store
// import store from '../global';
const
store
=
{
dispatch
:
()
=>
{},
};
const
codeMessage
=
{
200
:
'
服务器成功返回请求的数据。
'
,
...
...
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