From a534e4a56a355d0c5c42f302396282232b705b75 Mon Sep 17 00:00:00 2001 From: MengZhaoFly <1424254461@qq.com> Date: Mon, 27 Apr 2020 23:42:51 +0800 Subject: [PATCH] doc: fix layout demo (#23683) --- .../__tests__/__snapshots__/demo.test.js.snap | 377 ++++++++---------- components/layout/demo/custom-trigger.md | 15 +- components/layout/demo/fixed-sider.md | 40 +- components/layout/demo/responsive.md | 20 +- components/layout/demo/side.md | 34 +- components/layout/demo/top-side-2.md | 30 +- components/layout/demo/top-side.md | 30 +- 7 files changed, 218 insertions(+), 328 deletions(-) diff --git a/components/layout/__tests__/__snapshots__/demo.test.js.snap b/components/layout/__tests__/__snapshots__/demo.test.js.snap index 07c3bf4dc9..9b2ee27337 100644 --- a/components/layout/__tests__/__snapshots__/demo.test.js.snap +++ b/components/layout/__tests__/__snapshots__/demo.test.js.snap @@ -485,9 +485,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` /> - + nav 1 @@ -516,9 +514,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` /> - + nav 2 @@ -547,9 +543,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` /> - + nav 3 @@ -578,9 +572,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` /> - + nav 4 @@ -609,9 +601,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` /> - + nav 5 @@ -640,9 +630,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` /> - + nav 6 @@ -671,9 +659,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` /> - + nav 7 @@ -702,9 +688,7 @@ exports[`renders ./components/layout/demo/fixed-sider.md correctly 1`] = ` /> - + nav 8 @@ -877,9 +861,7 @@ exports[`renders ./components/layout/demo/responsive.md correctly 1`] = ` /> - + nav 1 @@ -908,9 +890,7 @@ exports[`renders ./components/layout/demo/responsive.md correctly 1`] = ` /> - + nav 2 @@ -939,9 +919,7 @@ exports[`renders ./components/layout/demo/responsive.md correctly 1`] = ` /> - + nav 3 @@ -970,9 +948,7 @@ exports[`renders ./components/layout/demo/responsive.md correctly 1`] = ` /> - + nav 4 @@ -1095,30 +1071,28 @@ exports[`renders ./components/layout/demo/side.md correctly 1`] = ` role="button" style="padding-left:24px" > - - + - - User - + + + + + User - - + - - Team - + + + + + Team + @@ -1632,27 +1605,27 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = ` role="button" style="padding-left:24px" > - - + + + + + subnav 1 - - + + + + + subnav 2 - - + + + + + subnav 3 - - + + + + + subnav 1 - - + + + + + subnav 2 - - + + + + + subnav 3
- - - nav 1 + }> + nav 1 - - - nav 2 + }> + nav 2 - - - nav 3 + }> + nav 3 diff --git a/components/layout/demo/fixed-sider.md b/components/layout/demo/fixed-sider.md index a83a6bb57d..b562df93ea 100644 --- a/components/layout/demo/fixed-sider.md +++ b/components/layout/demo/fixed-sider.md @@ -41,37 +41,29 @@ ReactDOM.render( >
- - - nav 1 + }> + nav 1 - - - nav 2 + }> + nav 2 - - - nav 3 + }> + nav 3 - - - nav 4 + }> + nav 4 - - - nav 5 + }> + nav 5 - - - nav 6 + }> + nav 6 - - - nav 7 + }> + nav 7 - - - nav 8 + }> + nav 8 diff --git a/components/layout/demo/responsive.md b/components/layout/demo/responsive.md index 6b34156c5e..ed20c06993 100644 --- a/components/layout/demo/responsive.md +++ b/components/layout/demo/responsive.md @@ -37,21 +37,17 @@ ReactDOM.render( >
- - - nav 1 + }> + nav 1 - - - nav 2 + }> + nav 2 - - - nav 3 + }> + nav 3 - - - nav 4 + }> + nav 4 diff --git a/components/layout/demo/side.md b/components/layout/demo/side.md index 80f02e72f4..0cad975d10 100644 --- a/components/layout/demo/side.md +++ b/components/layout/demo/side.md @@ -49,42 +49,22 @@ class SiderDemo extends React.Component {
- - - Option 1 + }> + Option 1 - - - Option 2 + }> + Option 2 - - - User - - } - > + } title="User"> Tom Bill Alex - - - Team - - } - > + } title="Team"> Team 1 Team 2 - - - + } /> diff --git a/components/layout/demo/top-side-2.md b/components/layout/demo/top-side-2.md index b719f9e1df..f4afc4cb46 100644 --- a/components/layout/demo/top-side-2.md +++ b/components/layout/demo/top-side-2.md @@ -38,43 +38,19 @@ ReactDOM.render( defaultOpenKeys={['sub1']} style={{ height: '100%', borderRight: 0 }} > - - - subnav 1 - - } - > + } title="subnav 1"> option1 option2 option3 option4 - - - subnav 2 - - } - > + } title="subnav 2"> option5 option6 option7 option8 - - - subnav 3 - - } - > + } title="subnav 3"> option9 option10 option11 diff --git a/components/layout/demo/top-side.md b/components/layout/demo/top-side.md index 3cc82dc2b3..817458e112 100644 --- a/components/layout/demo/top-side.md +++ b/components/layout/demo/top-side.md @@ -44,43 +44,19 @@ ReactDOM.render( defaultOpenKeys={['sub1']} style={{ height: '100%' }} > - - - subnav 1 - - } - > + } title="subnav 1"> option1 option2 option3 option4 - - - subnav 2 - - } - > + } title="subnav 2"> option5 option6 option7 option8 - - - subnav 3 - - } - > + } title="subnav 3"> option9 option10 option11