diff --git a/src/components/Charts/WaterWave/index.js b/src/components/Charts/WaterWave/index.js
index d1275de9ce97fa6eb6cbf41f320786b4a928545c..a9eece6165907533c7f99177ddbcb74f0f426c0b 100644
--- a/src/components/Charts/WaterWave/index.js
+++ b/src/components/Charts/WaterWave/index.js
@@ -102,7 +102,7 @@ class WaterWave extends PureComponent {
ctx.lineTo(xOffset, canvasHeight);
ctx.lineTo(startPoint[0], startPoint[1]);
- const gradient = ctx.createLinearGradient(0, 0, 0, 170);
+ const gradient = ctx.createLinearGradient(0, 0, 0, canvasHeight);
gradient.addColorStop(0, '#ffffff');
gradient.addColorStop(1, '#1890FF');
ctx.fillStyle = gradient;
diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js
index 5fbe3648b995312470fcf1c38696578564044f61..7bb8b4e38f8c8b5fd58c473b5c8296d824b48366 100644
--- a/src/components/PageHeader/index.js
+++ b/src/components/PageHeader/index.js
@@ -59,9 +59,8 @@ export default class PageHeader extends PureComponent {
const url = `/${pathSnippets.slice(0, index + 1).join('/')}`;
return (
- {createElement(linkElement, {
- to: url,
- href: url,
+ {createElement(index === pathSnippets.length - 1 ? 'span' : linkElement, {
+ [linkElement === 'a' ? 'href' : 'to']: url,
}, breadcrumbNameMap[url] || breadcrumbNameMap[url.replace('/', '')] || url)}
);
@@ -69,8 +68,7 @@ export default class PageHeader extends PureComponent {
const breadcrumbItems = [(
{createElement(linkElement, {
- to: '/',
- href: '/',
+ [linkElement === 'a' ? 'href' : 'to']: '/',
}, '首页')}
)].concat(extraBreadcrumbItems);
@@ -85,7 +83,11 @@ export default class PageHeader extends PureComponent {
{
breadcrumbList.map(item => (
- {item.href ? {item.title} : item.title}
+ {item.href ? (
+ createElement(linkElement, {
+ [linkElement === 'a' ? 'href' : 'to']: item.href,
+ }, '首页')
+ ) : item.title}
)
)
}
diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js
index 4da41ac0d88e7859ab2cf743e350e5f1601e8d40..17bace81c3c86e0b1d726a344b7a4e72143e45ba 100644
--- a/src/layouts/BasicLayout.js
+++ b/src/layouts/BasicLayout.js
@@ -58,6 +58,9 @@ class BasicLayout extends React.PureComponent {
getDefaultCollapsedSubMenus(props) {
const currentMenuSelectedKeys = [...this.getCurrentMenuSelectedKeys(props)];
currentMenuSelectedKeys.splice(-1, 1);
+ if (currentMenuSelectedKeys.length === 0) {
+ return ['dashboard'];
+ }
return currentMenuSelectedKeys;
}
getCurrentMenuSelectedKeys(props) {
diff --git a/src/routes/Forms/BasicForm.js b/src/routes/Forms/BasicForm.js
index c1b77a6cd232df4b46e63b789d6fc9247bb161d2..b613fca2ce64ce493335c9d4974342f59b2a8a0e 100644
--- a/src/routes/Forms/BasicForm.js
+++ b/src/routes/Forms/BasicForm.js
@@ -150,7 +150,7 @@ export default class BasicForms extends PureComponent {
{getFieldDecorator('public', {
initialValue: '1',
})(
-
+
公开
部分公开
不公开
diff --git a/src/routes/Forms/style.less b/src/routes/Forms/style.less
index 627b47da2eec43300e815ff4243c036246c20194..722aca805fcddd009a3c66687106a31bc7227ba8 100644
--- a/src/routes/Forms/style.less
+++ b/src/routes/Forms/style.less
@@ -88,11 +88,3 @@
color: @text-color-secondary;
font-style: normal;
}
-
-.radioGroup {
- :global {
- .ant-radio-wrapper {
- margin-right: 16px;
- }
- }
-}