Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ik_invoicing
Overview
Overview
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_frontend
ik_invoicing
Commits
c2997fed
Commit
c2997fed
authored
Dec 29, 2016
by
小明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整代码格式
parent
a1ffacac
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
91 deletions
+91
-91
internals/webpack/webpack.base.babel.js
+48
-47
internals/webpack/webpack.temp.babel.js
+2
-3
src/containers/HomePage/index.js
+0
-4
src/modules/dashboard/admin.js
+1
-1
src/modules/dashboard/member.js
+39
-35
src/routes.js
+1
-1
No files found.
internals/webpack/webpack.base.babel.js
View file @
c2997fed
...
...
@@ -14,60 +14,61 @@ module.exports = (options) => ({
},
options
.
output
),
// Merge with env dependent settings
module
:
{
rules
:
[
{
test
:
/
\.
js$/
,
// Transform all .js files required somewhere with Babel
use
:
'babel-loader'
,
exclude
:
/node_modules/
,
query
:
options
.
babelQuery
,
},
{
test
:
/
\.
js$/
,
// Transform all .js files required somewhere with Babel
use
:
'babel-loader'
,
exclude
:
/node_modules/
,
query
:
options
.
babelQuery
,
},
{
// Do not transform vendor's CSS with CSS-modules
// The point is that they remain in global scope.
// Since we require these CSS files in our JS or CSS files,
// they will be a part of our compilation either way.
// So, no need for ExtractTextPlugin here.
test
:
/
\.
css$/
,
include
:
/node_modules/
,
use
:
[
'style-loader'
,
'css-loader'
],
},
{
// Do not transform vendor's CSS with CSS-modules
// The point is that they remain in global scope.
// Since we require these CSS files in our JS or CSS files,
// they will be a part of our compilation either way.
// So, no need for ExtractTextPlugin here.
test
:
/
\.
css$/
,
include
:
/node_modules/
,
use
:
[
'style-loader'
,
'css-loader'
],
},
{
test
:
/
\.
scss$/
,
loader
:
ExtractTextPlugin
.
extract
({
loader
:
[
'css-loader?sourceMap'
,
'sass-loader?sourceMap'
]
// loader: ['css-loader?sourceMap', 'postcss-loader', 'sass-loader']
})
// use: ['style-loader', 'css-loader?sourceMap', 'postcss-loader', 'sass-loader']
},
{
test
:
/
\.
scss$/
,
loader
:
ExtractTextPlugin
.
extract
({
loader
:
[
'css-loader?sourceMap'
,
'sass-loader?sourceMap'
],
// loader: ['css-loader?sourceMap', 'postcss-loader', 'sass-loader']
}),
// use: ['style-loader', 'css-loader?sourceMap', 'postcss-loader', 'sass-loader']
},
{
test
:
/
\.(
eot|svg|ttf|woff|woff2
)
$/
,
use
:
'file-loader'
,
},
{
test
:
/
\.(
eot|svg|ttf|woff|woff2
)
$/
,
use
:
'file-loader'
,
},
{
test
:
/
\.(
jpg|png|gif
)
$/
,
use
:
[
'file-loader'
,
'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}}'
,
],
},
{
test
:
/
\.(
jpg|png|gif
)
$/
,
use
:
[
'file-loader'
,
'image-webpack?{progressive:true, optimizationLevel: 7, interlaced: false, pngquant:{quality: "65-90", speed: 4}}'
,
],
},
{
test
:
/
\.
html$/
,
use
:
'html-loader'
,
},
{
test
:
/
\.
html$/
,
use
:
'html-loader'
,
},
{
test
:
/
\.
json$/
,
use
:
'json-loader'
,
},
{
test
:
/
\.
json$/
,
use
:
'json-loader'
,
},
{
test
:
/
\.(
mp4|webm
)
$/
,
use
:
'url-loader?limit=10000'
,
}],
{
test
:
/
\.(
mp4|webm
)
$/
,
use
:
'url-loader?limit=10000'
,
},
],
},
plugins
:
options
.
plugins
.
concat
([
new
webpack
.
ProvidePlugin
({
...
...
internals/webpack/webpack.temp.babel.js
View file @
c2997fed
// Important modules this config uses
const
path
=
require
(
'path'
);
const
webpack
=
require
(
'webpack'
);
const
HtmlWebpackPlugin
=
require
(
'html-webpack-plugin'
);
const
OfflinePlugin
=
require
(
'offline-plugin'
);
module
.
exports
=
require
(
'./webpack.base.babel'
)({
// In production, we skip all hot-reloading stuff
...
...
@@ -17,8 +15,9 @@ module.exports = require('./webpack.base.babel')({
library
:
'window'
,
libraryTarget
:
'this'
,
},
externals
:
{
react
:
'React'
react
:
'React'
,
},
plugins
:
[
...
...
src/containers/HomePage/index.js
View file @
c2997fed
...
...
@@ -12,10 +12,6 @@
import
React
,
{
PureComponent
}
from
'react'
;
export
default
class
HomePage
extends
PureComponent
{
// eslint-disable-line react/prefer-stateless-function
constructor
(
props
)
{
super
(
props
);
}
render
()
{
return
(
<
h1
>
...
...
src/modules/dashboard/admin.js
View file @
c2997fed
...
...
@@ -238,7 +238,7 @@ class DashboardIndexAdmin extends Component { // eslint-disable-line react/prefe
{
tab
.
title
}
<
/p
>
<
/Col
>
})
;
}
})}
<
/Row
>
{
outlet
}
<
/Col
>
...
...
src/modules/dashboard/member.js
View file @
c2997fed
...
...
@@ -20,6 +20,44 @@ class DashboardIndexMember extends Component { // eslint-disable-line react/pref
{
type
:
'inventory'
,
name
:
'库存查询'
,
path
:
'/mobile/inventories'
},
].
chunk
(
4
);
let
outlet
=
null
;
if
(
this
.
props
.
loading
)
{
if
(
this
.
props
.
logined
)
{
outlet
=
(
<
Icon
type
=
'loading'
className
=
'search-loading'
/>
);
}
}
else
{
if
(
this
.
props
.
documents
.
length
>
0
)
{
outlet
=
(
<
Row
>
<
Col
span
=
'24'
>
{
props
.
documents
.
each
((
doc
)
=>
{
let
key
=
`
${
doc
.
type
}
_
${
doc
.
id
}
`
;
<
Document
key
=
{
key
}
document
=
{
doc
}
><
/Document
>
})}
<
/Col
>
<
/Row>
)
;
}
else
{
let
column
=
(
<
div
>
<
p
className
=
'ik-title-font ik-margin-top-20 ik-title-color'
>
还没有单据哦,快去新增吧
<
/p
>
<
/div>
)
;
if
(
!
props
.
hasPermission
)
{
column
=
(
<
div
>
<
svg
className
=
'file-color'
>
<
use
xlinkHref
=
{
props
.
icons
.
document
}
/
>
<
/svg
>
<
p
className
=
'ik-title-font ik-margin-top-20 ik-title-color'
>
亲,你没有权限操作此功能哦
<
/p
>
<
/div>
)
;
}
outlet
=
(
<
Row
type
=
'flex'
justify
=
'center'
className
=
'document-list ik-padding-bottom-20'
>
<
Col
span
=
'16'
className
=
'ik-text-center'
>
{
column
}
<
/Col
>
<
/Row>
)
;
}
}
return
(
<
Row
>
<
Row
id
=
"action-sheet-button-container"
>
<
Col
span
=
'6'
offset
=
'18'
className
=
'ik-padding-top-20'
>
...
...
@@ -71,41 +109,7 @@ class DashboardIndexMember extends Component { // eslint-disable-line react/pref
<
p
className
=
'document-title'
>
最近的单据
<
/p
>
<
/Col
>
<
Col
span
=
'24'
>
{
if
(
this
.
props
.
loading
)
{
if
(
this
.
props
.
logined
)
{
<
Icon
type
=
'loading'
className
=
'search-loading'
/>
}
}
else
{
if
(
this
.
props
.
documents
.
length
>
0
)
{
<
Row
>
<
Col
span
=
'24'
>
{
props
.
documents
.
each
(
doc
){
<
Document
key
=
`
${
document
.
type
}
_
${
document
.
id
}
`
document
=
{
doc
}
><
/Document
>
}}
<
/Col
>
<
/Row
>
}
else
{
<
Row
type
=
'flex'
justify
=
'center'
className
=
'document-list ik-padding-bottom-20'
>
<
Col
span
=
'16'
className
=
'ik-text-center'
>
{
if
!
(
props
.
hasPermission
)
{
<
div
>
<
svg
className
=
'file-color'
>
<
use
xlinkHref
=
{
props
.
icons
.
document
}
/
>
<
/svg
>
<
/div
>
<
p
className
=
'ik-title-font ik-margin-top-20 ik-title-color'
>
亲,你没有权限操作此功能哦
<
/p
>
}
else
{
<
div
>
<
p
className
=
'ik-title-font ik-margin-top-20 ik-title-color'
>
还没有单据哦,快去新增吧
<
/p
>
<
/div
>
}}
<
/Col
>
<
/Row
>
}
}
}
{
outlet
}
<
/Col
>
<
/Row
>
<
/Row>
)
...
...
src/routes.js
View file @
c2997fed
...
...
@@ -33,6 +33,6 @@ export default function createRoutes(store) {
importModules
.
catch
(
errorLoading
);
},
}
}
,
];
}
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