Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
app-manage-console
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
ReactNative
app-manage-console
Commits
8b6f48b1
提交
8b6f48b1
authored
9月 17, 2018
作者:
vipcxj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1. update dependencies.
2. make eslint happy.
上级
b893ad75
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
92 行增加
和
83 行删除
+92
-83
.eslintrc
.eslintrc
+4
-0
package.json
package.json
+68
-68
index.js
src/components/table/index.js
+8
-5
enum.js
src/components/table/search/enum.js
+7
-5
header.js
src/routes/main/header.js
+1
-1
helper.js
src/utils/helper.js
+4
-4
没有找到文件。
.eslintrc
浏览文件 @
8b6f48b1
...
@@ -33,8 +33,12 @@
...
@@ -33,8 +33,12 @@
"no-multi-assign": "off",
"no-multi-assign": "off",
"no-await-in-loop": "off",
"no-await-in-loop": "off",
"prefer-destructuring": "off",
"prefer-destructuring": "off",
"lines-between-class-members": "off",
"no-multiple-empty-lines": "off",
"react/require-default-props": "off",
"react/require-default-props": "off",
"react/no-array-index-key": "off",
"react/no-array-index-key": "off",
"react/destructuring-assignment": "off",
"react/jsx-one-expression-per-line": "off",
"lodash-fp/use-fp": "off",
"lodash-fp/use-fp": "off",
"lodash-fp/no-unused-result": "off"
"lodash-fp/no-unused-result": "off"
},
},
...
...
package.json
浏览文件 @
8b6f48b1
...
@@ -16,117 +16,117 @@
...
@@ -16,117 +16,117 @@
"ie >= 9"
"ie >= 9"
],
],
"dependencies"
:
{
"dependencies"
:
{
"
@babel/runtime
"
:
"^7.0.0
-beta.51
"
,
"
@babel/runtime
"
:
"^7.0.0"
,
"
antd
"
:
"^3.
6
.2"
,
"
antd
"
:
"^3.
9
.2"
,
"
axo
"
:
"^0.0.2"
,
"
axo
"
:
"^0.0.2"
,
"
bowser
"
:
"^1.9.
3
"
,
"
bowser
"
:
"^1.9.
4
"
,
"
classnames
"
:
"^2.2.6"
,
"
classnames
"
:
"^2.2.6"
,
"
dva
"
:
"^2.
3.1
"
,
"
dva
"
:
"^2.
4.0
"
,
"
dva-loading
"
:
"^2.0.
3
"
,
"
dva-loading
"
:
"^2.0.
5
"
,
"
fastjson_ref_resolver
"
:
"^0.0.3"
,
"
fastjson_ref_resolver
"
:
"^0.0.3"
,
"
fingerprintjs
"
:
"^0.5.3"
,
"
fingerprintjs
"
:
"^0.5.3"
,
"
github-markdown-css
"
:
"^2.10.0"
,
"
github-markdown-css
"
:
"^2.10.0"
,
"
highlight.js
"
:
"^9.12.0"
,
"
highlight.js
"
:
"^9.12.0"
,
"
history
"
:
"^4.7.2"
,
"
history
"
:
"^4.7.2"
,
"
hoist-non-react-statics
"
:
"^
2.5.4
"
,
"
hoist-non-react-statics
"
:
"^
3.0.1
"
,
"
is-promise
"
:
"^2.1.0"
,
"
is-promise
"
:
"^2.1.0"
,
"
lodash
"
:
"^4.17.10"
,
"
lodash
"
:
"^4.17.10"
,
"
lowdb
"
:
"^1.0.0"
,
"
lowdb
"
:
"^1.0.0"
,
"
moment
"
:
"^2.22.2"
,
"
moment
"
:
"^2.22.2"
,
"
prop-types
"
:
"^15.6.
1
"
,
"
prop-types
"
:
"^15.6.
2
"
,
"
react
"
:
"^16.
4.1
"
,
"
react
"
:
"^16.
5.0
"
,
"
react-async-wrapper
"
:
"^1.0.5"
,
"
react-async-wrapper
"
:
"^1.0.5"
,
"
react-dom
"
:
"^16.
4.1
"
,
"
react-dom
"
:
"^16.
5.0
"
,
"
react-json-view
"
:
"^1.1
7
.1"
,
"
react-json-view
"
:
"^1.1
9
.1"
,
"
react-markdown
"
:
"^3.
3.3
"
,
"
react-markdown
"
:
"^3.
6.0
"
,
"
react-router-4-compat
"
:
"^1.0.8"
,
"
react-router-4-compat
"
:
"^1.0.8"
,
"
react-sizeme
"
:
"
2.4.1
"
,
"
react-sizeme
"
:
"
^2.5.2
"
,
"
redux-persist
"
:
"^5.10.0"
,
"
redux-persist
"
:
"^5.10.0"
,
"
resolve-pathname
"
:
"^2.2.0"
,
"
resolve-pathname
"
:
"^2.2.0"
,
"
uuid
"
:
"^3.
2.1
"
,
"
uuid
"
:
"^3.
3.2
"
,
"
word-wrap
"
:
"^1.2.3"
,
"
word-wrap
"
:
"^1.2.3"
,
"
xml2js
"
:
"^0.4.19"
"
xml2js
"
:
"^0.4.19"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"
@babel/core
"
:
"^7.0.0
-beta.51
"
,
"
@babel/core
"
:
"^7.0.0"
,
"
@babel/helper-plugin-utils
"
:
"^7.0.0
-beta.51
"
,
"
@babel/helper-plugin-utils
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-async-generator-functions
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-async-generator-functions
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-class-properties
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-class-properties
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-decorators
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-decorators
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-do-expressions
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-do-expressions
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-export-default-from
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-export-default-from
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-export-namespace-from
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-export-namespace-from
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-function-bind
"
:
"^7.0.0-beta.51"
,
"
@babel/plugin-proposal-function-bind
"
:
"^7.0.0-beta.51"
,
"
@babel/plugin-proposal-nullish-coalescing-operator
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-nullish-coalescing-operator
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-object-rest-spread
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-object-rest-spread
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-optional-catch-binding
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-optional-catch-binding
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-optional-chaining
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-optional-chaining
"
:
"^7.0.0"
,
"
@babel/plugin-proposal-pipeline-operator
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-proposal-pipeline-operator
"
:
"^7.0.0"
,
"
@babel/plugin-syntax-dynamic-import
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-syntax-dynamic-import
"
:
"^7.0.0"
,
"
@babel/plugin-transform-react-constant-elements
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-transform-react-constant-elements
"
:
"^7.0.0"
,
"
@babel/plugin-transform-react-inline-elements
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-transform-react-inline-elements
"
:
"^7.0.0"
,
"
@babel/plugin-transform-runtime
"
:
"^7.0.0
-beta.51
"
,
"
@babel/plugin-transform-runtime
"
:
"^7.0.0"
,
"
@babel/polyfill
"
:
"^7.0.0
-beta.51
"
,
"
@babel/polyfill
"
:
"^7.0.0"
,
"
@babel/preset-env
"
:
"^7.0.0
-beta.51
"
,
"
@babel/preset-env
"
:
"^7.0.0"
,
"
@babel/preset-react
"
:
"^7.0.0
-beta.51
"
,
"
@babel/preset-react
"
:
"^7.0.0"
,
"
@babel/register
"
:
"^7.0.0
-beta.51
"
,
"
@babel/register
"
:
"^7.0.0"
,
"
@storybook/addon-actions
"
:
"^4.0.0-alpha.
9
"
,
"
@storybook/addon-actions
"
:
"^4.0.0-alpha.
21
"
,
"
@storybook/addon-info
"
:
"^4.0.0-alpha.
9
"
,
"
@storybook/addon-info
"
:
"^4.0.0-alpha.
21
"
,
"
@storybook/addon-links
"
:
"^4.0.0-alpha.
9
"
,
"
@storybook/addon-links
"
:
"^4.0.0-alpha.
21
"
,
"
@storybook/react
"
:
"^4.0.0-alpha.
9
"
,
"
@storybook/react
"
:
"^4.0.0-alpha.
21
"
,
"
@types/webpack
"
:
"^4.4.
0
"
,
"
@types/webpack
"
:
"^4.4.
11
"
,
"
autoprefixer
"
:
"^
8.6.2
"
,
"
autoprefixer
"
:
"^
9.1.5
"
,
"
awesome-typescript-loader
"
:
"^5.
0.0
"
,
"
awesome-typescript-loader
"
:
"^5.
2.1
"
,
"
babel-core
"
:
"^7.0.0-bridge.0"
,
"
babel-core
"
:
"^7.0.0-bridge.0"
,
"
babel-eslint
"
:
"^
8.2.3
"
,
"
babel-eslint
"
:
"^
9.0.0
"
,
"
babel-loader
"
:
"^8.0.
0-beta.3
"
,
"
babel-loader
"
:
"^8.0.
2
"
,
"
babel-plugin-dev-expression
"
:
"^0.2.1"
,
"
babel-plugin-dev-expression
"
:
"^0.2.1"
,
"
babel-plugin-dva-hmr
"
:
"^0.4.1"
,
"
babel-plugin-dva-hmr
"
:
"^0.4.1"
,
"
babel-plugin-import
"
:
"^1.8.0"
,
"
babel-plugin-import
"
:
"^1.8.0"
,
"
babel-plugin-lodash
"
:
"^3.3.4"
,
"
babel-plugin-lodash
"
:
"^3.3.4"
,
"
babel-plugin-react-require
"
:
"^3.0.0"
,
"
babel-plugin-react-require
"
:
"^3.0.0"
,
"
babel-plugin-transform-react-remove-prop-types
"
:
"^0.4.1
3
"
,
"
babel-plugin-transform-react-remove-prop-types
"
:
"^0.4.1
5
"
,
"
cache-loader
"
:
"^1.2.2"
,
"
cache-loader
"
:
"^1.2.2"
,
"
case-sensitive-paths-webpack-plugin
"
:
"^2.1.2"
,
"
case-sensitive-paths-webpack-plugin
"
:
"^2.1.2"
,
"
chai
"
:
"^4.1.2"
,
"
chai
"
:
"^4.1.2"
,
"
clean-webpack-plugin
"
:
"^0.1.19"
,
"
clean-webpack-plugin
"
:
"^0.1.19"
,
"
copy-webpack-plugin
"
:
"^4.5.
1
"
,
"
copy-webpack-plugin
"
:
"^4.5.
2
"
,
"
cross-env
"
:
"^5.2.0"
,
"
cross-env
"
:
"^5.2.0"
,
"
ejs-loader
"
:
"^0.3.1"
,
"
ejs-loader
"
:
"^0.3.1"
,
"
enzyme
"
:
"^3.3.0"
,
"
enzyme
"
:
"^3.3.0"
,
"
eslint
"
:
"^
4.19.1
"
,
"
eslint
"
:
"^
5.5.0
"
,
"
eslint-config-airbnb
"
:
"^1
6
.1.0"
,
"
eslint-config-airbnb
"
:
"^1
7
.1.0"
,
"
eslint-loader
"
:
"^2.
0
.0"
,
"
eslint-loader
"
:
"^2.
1
.0"
,
"
eslint-plugin-import
"
:
"^2.1
1
.0"
,
"
eslint-plugin-import
"
:
"^2.1
4
.0"
,
"
eslint-plugin-jsx-a11y
"
:
"^6.
0.3
"
,
"
eslint-plugin-jsx-a11y
"
:
"^6.
1.1
"
,
"
eslint-plugin-lodash-fp
"
:
"^2.1.3"
,
"
eslint-plugin-lodash-fp
"
:
"^2.1.3"
,
"
eslint-plugin-react
"
:
"^7.
7.0
"
,
"
eslint-plugin-react
"
:
"^7.
11.1
"
,
"
highlight-loader
"
:
"^0.7.2"
,
"
highlight-loader
"
:
"^0.7.2"
,
"
html-webpack-plugin
"
:
"^3.2.0"
,
"
html-webpack-plugin
"
:
"^3.2.0"
,
"
http-proxy-middleware
"
:
"^0.1
8
.0"
,
"
http-proxy-middleware
"
:
"^0.1
9
.0"
,
"
jest
"
:
"^23.
1
.0"
,
"
jest
"
:
"^23.
6
.0"
,
"
jsdom
"
:
"^1
1.11
.0"
,
"
jsdom
"
:
"^1
2.0
.0"
,
"
less
"
:
"^3.
0.4
"
,
"
less
"
:
"^3.
8.1
"
,
"
less-loader
"
:
"^4.1.0"
,
"
less-loader
"
:
"^4.1.0"
,
"
lodash-webpack-plugin
"
:
"^0.11.5"
,
"
lodash-webpack-plugin
"
:
"^0.11.5"
,
"
markdown-loader
"
:
"^
2.0.2
"
,
"
markdown-loader
"
:
"^
4.0.0
"
,
"
mini-css-extract-plugin
"
:
"^0.4.
0
"
,
"
mini-css-extract-plugin
"
:
"^0.4.
2
"
,
"
mockjs
"
:
"^1.0.1-beta3"
,
"
mockjs
"
:
"^1.0.1-beta3"
,
"
optimize-css-assets-webpack-plugin
"
:
"^
4.0.2
"
,
"
optimize-css-assets-webpack-plugin
"
:
"^
5.0.1
"
,
"
path
"
:
"^0.12.7"
,
"
path
"
:
"^0.12.7"
,
"
postcss-flexbugs-fixes
"
:
"^
3.3.1
"
,
"
postcss-flexbugs-fixes
"
:
"^
4.1.0
"
,
"
raw-loader
"
:
"^0.5.1"
,
"
raw-loader
"
:
"^0.5.1"
,
"
react-dev-utils
"
:
"^5.0.
1
"
,
"
react-dev-utils
"
:
"^5.0.
2
"
,
"
react-test-renderer
"
:
"^16.
4.1
"
,
"
react-test-renderer
"
:
"^16.
5.0
"
,
"
redbox-react
"
:
"^1.6.0"
,
"
redbox-react
"
:
"^1.6.0"
,
"
style-loader
"
:
"^0.2
1
.0"
,
"
style-loader
"
:
"^0.2
3
.0"
,
"
uglifyjs-webpack-plugin
"
:
"^1.
2.5
"
,
"
uglifyjs-webpack-plugin
"
:
"^1.
3.0
"
,
"
url-loader
"
:
"^1.
0
.1"
,
"
url-loader
"
:
"^1.
1
.1"
,
"
webpack
"
:
"^4.1
2
.0"
,
"
webpack
"
:
"^4.1
8
.0"
,
"
webpack-bundle-analyzer
"
:
"^2.13.1"
,
"
webpack-bundle-analyzer
"
:
"^2.13.1"
,
"
webpack-cli
"
:
"^3.
0.6
"
,
"
webpack-cli
"
:
"^3.
1.0
"
,
"
webpack-dev-server
"
:
"^3.1.
4
"
,
"
webpack-dev-server
"
:
"^3.1.
8
"
,
"
webpack-manifest-plugin
"
:
"^2.0.3"
,
"
webpack-manifest-plugin
"
:
"^2.0.3"
,
"
webpack-merge
"
:
"^4.1.
3
"
"
webpack-merge
"
:
"^4.1.
4
"
}
}
}
}
src/components/table/index.js
浏览文件 @
8b6f48b1
...
@@ -46,11 +46,13 @@ class TableEx extends Component {
...
@@ -46,11 +46,13 @@ class TableEx extends Component {
const
state
=
this
.
state
.
columns
[
index
];
const
state
=
this
.
state
.
columns
[
index
];
if
(
ret
.
filterType
)
{
if
(
ret
.
filterType
)
{
const
onSearch
=
(
filter
)
=>
{
const
onSearch
=
(
filter
)
=>
{
const
newColumns
=
[...
this
.
state
.
columns
];
this
.
setState
((
preState
)
=>
{
const
newColumns
=
[...
preState
.
columns
];
newColumns
[
index
].
filter
=
filter
;
newColumns
[
index
].
filter
=
filter
;
newColumns
[
index
].
filtered
=
!!
filter
;
newColumns
[
index
].
filtered
=
!!
filter
;
newColumns
[
index
].
filterDropdownVisible
=
false
;
newColumns
[
index
].
filterDropdownVisible
=
false
;
this
.
setState
({
columns
:
newColumns
},
()
=>
{
return
{
columns
:
newColumns
};
},
()
=>
{
this
.
props
.
onFilter
(
this
.
state
.
columns
.
map
(
c
=>
({
this
.
props
.
onFilter
(
this
.
state
.
columns
.
map
(
c
=>
({
key
:
c
.
key
,
key
:
c
.
key
,
filter
:
c
.
filter
,
filter
:
c
.
filter
,
...
@@ -62,9 +64,11 @@ class TableEx extends Component {
...
@@ -62,9 +64,11 @@ class TableEx extends Component {
);
);
ret
.
filterDropdownVisible
=
state
.
filterDropdownVisible
;
ret
.
filterDropdownVisible
=
state
.
filterDropdownVisible
;
ret
.
onFilterDropdownVisibleChange
=
(
visible
)
=>
{
ret
.
onFilterDropdownVisibleChange
=
(
visible
)
=>
{
const
newColumns
=
[...
this
.
state
.
columns
];
this
.
setState
((
preState
)
=>
{
const
newColumns
=
[...
preState
.
columns
];
newColumns
[
index
].
filterDropdownVisible
=
visible
;
newColumns
[
index
].
filterDropdownVisible
=
visible
;
this
.
setState
({
columns
:
newColumns
});
return
{
columns
:
newColumns
};
});
};
};
ret
.
filterIcon
=
Search
.
getIcon
(
ret
.
filterType
,
state
.
filtered
);
ret
.
filterIcon
=
Search
.
getIcon
(
ret
.
filterType
,
state
.
filtered
);
}
}
...
@@ -110,4 +114,3 @@ TableEx.defaultProps = {
...
@@ -110,4 +114,3 @@ TableEx.defaultProps = {
};
};
export
default
TableEx
;
export
default
TableEx
;
src/components/table/search/enum.js
浏览文件 @
8b6f48b1
...
@@ -45,9 +45,9 @@ class EnumSearch extends Component {
...
@@ -45,9 +45,9 @@ class EnumSearch extends Component {
}
}
}
}
reset
()
{
reset
()
{
this
.
setState
({
this
.
setState
(
preState
=>
(
{
checked
:
this
.
s
tate
.
checked
.
map
(()
=>
false
),
checked
:
preS
tate
.
checked
.
map
(()
=>
false
),
});
})
)
;
}
}
render
()
{
render
()
{
...
@@ -57,9 +57,11 @@ class EnumSearch extends Component {
...
@@ -57,9 +57,11 @@ class EnumSearch extends Component {
{
{
filterEnums
.
map
((
filterEnum
,
index
)
=>
{
filterEnums
.
map
((
filterEnum
,
index
)
=>
{
const
onChange
=
(
e
)
=>
{
const
onChange
=
(
e
)
=>
{
const
checked
=
[...
this
.
state
.
checked
];
this
.
setState
((
preState
)
=>
{
const
checked
=
[...
preState
.
checked
];
checked
[
index
]
=
e
.
target
.
checked
;
checked
[
index
]
=
e
.
target
.
checked
;
this
.
setState
({
checked
});
return
{
checked
};
});
};
};
return
(
return
(
<
span
key
=
{
index
}
>
<
span
key
=
{
index
}
>
...
...
src/routes/main/header.js
浏览文件 @
8b6f48b1
...
@@ -134,7 +134,7 @@ class HeaderPane extends React.Component {
...
@@ -134,7 +134,7 @@ class HeaderPane extends React.Component {
<
div
className
=
{
styles
.
board
}
>
<
div
className
=
{
styles
.
board
}
>
<
Breadcrumb
{...
breadsProps
}
/
>
<
Breadcrumb
{...
breadsProps
}
/
>
<
Menu
{...
menuProps
}
>
<
Menu
{...
menuProps
}
>
<
SubMenu
title
=
{
userTitle
}
key
=
"user"
>
<
SubMenu
title
=
{
userTitle
}
key
=
"user"
>
<
Menu
.
Item
key
=
"logout"
>
<
Menu
.
Item
key
=
"logout"
>
<
span
>
<
span
>
<
Icon
type
=
"logout"
/>
<
Icon
type
=
"logout"
/>
...
...
src/utils/helper.js
浏览文件 @
8b6f48b1
...
@@ -130,10 +130,10 @@ export function padDigits(number, digits) {
...
@@ -130,10 +130,10 @@ export function padDigits(number, digits) {
}
}
export
function
is
(
obj
,
type
)
{
export
function
is
(
obj
,
type
)
{
return
(
type
===
'Null'
&&
obj
===
null
)
||
return
(
type
===
'Null'
&&
obj
===
null
)
(
type
===
'Undefined'
&&
obj
===
void
0
)
||
// eslint-disable-line no-void
||
(
type
===
'Undefined'
&&
obj
===
void
0
)
// eslint-disable-line no-void
(
type
===
'Number'
&&
Number
.
isFinite
(
obj
))
||
||
(
type
===
'Number'
&&
Number
.
isFinite
(
obj
))
Object
.
prototype
.
toString
.
call
(
obj
).
slice
(
8
,
-
1
)
===
type
;
||
Object
.
prototype
.
toString
.
call
(
obj
).
slice
(
8
,
-
1
)
===
type
;
}
}
export
function
makePromise0
(
thunk
)
{
export
function
makePromise0
(
thunk
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论