+
{loading ? : ''}
{children}
)
}
}
+
+
+Page.propTypes = {
+ className: PropTypes.string,
+ children: PropTypes.node,
+ loading: PropTypes.bool,
+ inner: PropTypes.bool,
+}
diff --git a/src/components/Page/Page.less b/src/components/Page/Page.less
index fed0403..5a1e1b5 100644
--- a/src/components/Page/Page.less
+++ b/src/components/Page/Page.less
@@ -1,68 +1,14 @@
-.loader {
- display: block;
- background-color: #fff;
- width: 100%;
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- z-index: 100000;
- display: flex;
- justify-content: center;
- align-items: center;
- opacity: 1;
- text-align: center;
+@import "~themes/vars";
- &.fullScreen {
- position: fixed;
- }
-
- .warpper {
- width: 100px;
- height: 100px;
- display: inline-flex;
- flex-direction: column;
- justify-content: space-around;
- }
-
- .inner {
- width: 48px;
- height: 48px;
- margin: 0 auto;
- text-indent: -12345px;
- border-top: 1px solid rgba(0, 0, 0, 0.08);
- border-right: 1px solid rgba(0, 0, 0, 0.08);
- border-bottom: 1px solid rgba(0, 0, 0, 0.08);
- border-left: 1px solid rgba(0, 0, 0, 0.7);
- border-radius: 50%;
- z-index: 100001;
-
- :local {
- animation: spinner 600ms infinite linear;
- }
- }
-
- .text {
- width: 100px;
- height: 20px;
- text-align: center;
- font-size: 12px;
- letter-spacing: 4px;
- color: #000;
- }
-
- &.hidden {
- z-index: -1;
- opacity: 0;
- transition: opacity 1s ease 0.5s, z-index 0.1s ease 1.5s;
- }
+.contentInner{
+ background: #fff;
+ padding: 24px;
+ box-shadow: @shadow-1;
+ min-height: e("calc(100vh - 184px)");
}
-@keyframes spinner {
- 0% {
- transform: rotate(0deg);
- }
-
- 100% {
- transform: rotate(360deg);
+@media (max-width: 767px) {
+ .contentInner {
+ padding: 12px;
+ min-height: e("calc(100vh - 160px)");
}
}
diff --git a/src/components/index.js b/src/components/index.js
index a1a372c..492e40c 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -6,7 +6,6 @@ import Editor from './Editor'
import FilterItem from './FilterItem'
import Loader from './Loader'
import * as Layout from './Layout/index.js'
-import LinkWrapper from './LinkWrapper'
import Page from './Page'
import layer from './layer'
@@ -21,6 +20,5 @@ export {
FilterItem,
Loader,
layer,
- LinkWrapper,
Page,
}
diff --git a/src/models/user.js b/src/models/user.js
index cfaf1fa..fb61317 100644
--- a/src/models/user.js
+++ b/src/models/user.js
@@ -3,8 +3,8 @@ import modelExtend from 'dva-model-extend'
import { config } from 'utils'
import { create, remove, update } from 'services/user'
import * as usersService from 'services/users'
-import { pageModel } from './common'
import queryString from 'query-string'
+import { pageModel } from './common'
const { query } = usersService
const { prefix } = config
diff --git a/src/router.js b/src/router.js
index 542018c..066d672 100644
--- a/src/router.js
+++ b/src/router.js
@@ -1,9 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
-import { Router, Switch, Route, Redirect, routerRedux } from 'dva/router'
+import { Switch, Route, Redirect, routerRedux } from 'dva/router'
import dynamic from 'dva/dynamic'
import App from 'routes/app'
-import { Loader } from 'components'
const { ConnectedRouter } = routerRedux
diff --git a/src/routes/app.js b/src/routes/app.js
index 5569caa..cc662a7 100644
--- a/src/routes/app.js
+++ b/src/routes/app.js
@@ -7,10 +7,10 @@ import { connect } from 'dva'
import { Layout, Loader } from 'components'
import { classnames, config } from 'utils'
import { Helmet } from 'react-helmet'
+import { withRouter } from 'dva/router'
import '../themes/index.less'
import './app.less'
import Error from './error'
-import { withRouter } from 'dva/router'
const { prefix, openPages } = config
@@ -41,16 +41,16 @@ const App = ({ children, dispatch, app, loading, location }) => {
isNavbar,
menuPopoverVisible,
navOpenKeys,
- switchMenuPopover() {
+ switchMenuPopover () {
dispatch({ type: 'app/switchMenuPopver' })
},
- logout() {
+ logout () {
dispatch({ type: 'app/logout' })
},
- switchSider() {
+ switchSider () {
dispatch({ type: 'app/switchSider' })
},
- changeOpenKeys(openKeys) {
+ changeOpenKeys (openKeys) {
dispatch({ type: 'app/handleNavOpenKeys', payload: { navOpenKeys: openKeys } })
},
}
@@ -61,10 +61,10 @@ const App = ({ children, dispatch, app, loading, location }) => {
siderFold,
darkTheme,
navOpenKeys,
- changeTheme() {
+ changeTheme () {
dispatch({ type: 'app/switchTheme' })
},
- changeOpenKeys(openKeys) {
+ changeOpenKeys (openKeys) {
window.localStorage.setItem(`${prefix}navOpenKeys`, JSON.stringify(openKeys))
dispatch({ type: 'app/handleNavOpenKeys', payload: { navOpenKeys: openKeys } })
},
diff --git a/src/routes/user/List.js b/src/routes/user/List.js
index 8f43f5d..abf1c03 100644
--- a/src/routes/user/List.js
+++ b/src/routes/user/List.js
@@ -3,9 +3,9 @@ import PropTypes from 'prop-types'
import { Table, Modal } from 'antd'
import classnames from 'classnames'
import { DropOption } from 'components'
-import { LinkWrapper } from 'components'
-import AnimTableBody from '../../components/DataTable/AnimTableBody'
+import { Link } from 'react-router-dom'
import queryString from 'query-string'
+import AnimTableBody from 'components/DataTable/AnimTableBody'
import styles from './List.less'
const confirm = Modal.confirm
@@ -38,7 +38,7 @@ const List = ({ onDeleteItem, onEditItem, isMotion, location, ...tableProps }) =
title: 'Name',
dataIndex: 'name',
key: 'name',
- render: (text, record) =>
{text},
+ render: (text, record) =>
{text},
}, {
title: 'NickName',
dataIndex: 'nickName',
diff --git a/src/routes/user/index.js b/src/routes/user/index.js
index 258899d..696d180 100644
--- a/src/routes/user/index.js
+++ b/src/routes/user/index.js
@@ -3,10 +3,12 @@ import PropTypes from 'prop-types'
import { routerRedux } from 'dva/router'
import { connect } from 'dva'
import { Row, Col, Button, Popconfirm } from 'antd'
+import { Page } from 'components'
+import queryString from 'query-string'
import List from './List'
import Filter from './Filter'
import Modal from './Modal'
-import queryString from 'query-string'
+
const User = ({ location, dispatch, user, loading }) => {
location.query = queryString.parse(location.search)
@@ -127,7 +129,7 @@ const User = ({ location, dispatch, user, loading }) => {
}
return (
-
+
{
selectedRowKeys.length > 0 &&
@@ -142,7 +144,7 @@ const User = ({ location, dispatch, user, loading }) => {
}
{modalVisible && }
-
+
)
}
From dedd34e8e8f41fe0c5057fdf9fa4e4f864453613 Mon Sep 17 00:00:00 2001
From: zuiidea
Date: Sat, 9 Sep 2017 14:50:47 +0800
Subject: [PATCH 6/6] 4.3.5
---
README.md | 35 ++++++++---------------------------
package.json | 8 +++-----
2 files changed, 11 insertions(+), 32 deletions(-)
diff --git a/README.md b/README.md
index ccda839..189e9a9 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[](https://github.com/facebook/react)
[](https://github.com/ant-design/ant-design)
-[](https://github.com/dvajs/dva)
+[](https://github.com/dvajs/dva)
[](https://github.com/zuiidea/antd-admin)
[](https://github.com/zuiidea/antd-admin/pulls)
@@ -21,6 +21,13 @@
## 更新日志
+
+### 4.3.5
+
+`2017-09-04`
+
+- 更新[dva](https://github.com/dvajs/dva)至`2.0.1`,感谢[@yangbin1994](https://github.com/yangbin1994)的[PR](https://github.com/zuiidea/antd-admin/pull/567)。
+
### 4.3.4
`2017-09-04`
@@ -38,32 +45,6 @@
- 新增打包时按项目版本号生成文件目录。[#449](https://github.com/zuiidea/antd-admin/issues/449)
- 更新`eslint`,并适当修改了`.eslintrc`。
-### 4.2.3
-
-`2017-07-07`
-
-- 新增用户按权限访问。[#384](https://github.com/zuiidea/antd-admin/issues/384)
-
-### 4.2.2
-
-`2017-06-01`
-
-- 新增用户管理批量删除。[#320](https://github.com/zuiidea/antd-admin/issues/320)
-
-### 4.2.1
-
-`2017-05-12`
-
-- 新增IconFont扩展方案,本地使用方案。[#270](https://github.com/zuiidea/antd-admin/issues/270) [Live](http://47.92.30.98:666/UIElement/iconfont)
-- 新增常见场景使用loading。 [dva-loading](https://github.com/dvajs/dva-loading)
-
-### 4.2
-
-`2017-04-28`
-
-- 修改user相关API使用`Restful`风格。
-- 增加user页面多条件查询。[#266](https://github.com/zuiidea/antd-admin/issues/226)
-- 修复菜单默认高亮。[#201](https://github.com/zuiidea/antd-admin/issues/201)
[More Change Log](https://github.com/zuiidea/antd-admin/wiki/Change-Log)
diff --git a/package.json b/package.json
index 653f5c6..3c41117 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "antd-admin",
- "version": "4.3.4",
+ "version": "4.3.5",
"dependencies": {
"antd": "^2.11.2",
"axios": "^0.16.2",
@@ -53,9 +53,7 @@
"redbox-react": "^1.2.10",
"roadhog": "^1.2.2"
},
- "pre-commit": [
- "lint"
- ],
+ "pre-commit": ["lint"],
"scripts": {
"dev": "cross-env BROWSER=none HOST=0.0.0.0 roadhog server",
"lint": "eslint --fix --ext .js src",
@@ -63,4 +61,4 @@
"build:dll": "roadhog buildDll",
"build:new": "node version && roadhog build"
}
-}
+}
\ No newline at end of file