Browse Source

Fix the naming problem

pull/11234/head
陈帅 6 years ago
parent
commit
441b90e488
  1. 4
      .prettierignore
  2. 11
      .prettierrc
  3. 6
      components/drawer/demo/from-drawer.md
  4. 12
      components/drawer/demo/multi-level-drawer.md
  5. 2
      components/drawer/index.tsx

4
.prettierignore

@ -1,4 +0,0 @@
**/*.svg
**/*.ejs
**/*.html
package.json

11
.prettierrc

@ -1,11 +0,0 @@
{
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 100,
"overrides": [
{
"files": ".prettierrc",
"options": { "parser": "json" }
}
]
}

6
components/drawer/demo/from-drawer.md

@ -18,7 +18,7 @@ import { Drawer, Form, Button, Col, Row, Input, Select, DatePicker } from 'antd'
const { Option } = Select;
class App extends React.Component {
class DrawerForm extends React.Component {
state = { visible: false };
showDrawer = () => {
this.setState({
@ -171,9 +171,9 @@ class App extends React.Component {
);
}
}
const WarpApp = Form.create()(App);
const App = Form.create()(DrawerForm);
ReactDOM.render(<WarpApp />, mountNode);
ReactDOM.render(<App />, mountNode);
```
<style>

12
components/drawer/demo/multi-level-drawer.md

@ -18,18 +18,16 @@ import { Drawer, List, Form, Button, Input, Tag } from 'antd';
const vegetables = ['asparagus', 'bamboo', 'potato', 'carrot', 'cilantro', 'potato', 'eggplant'];
const TagList = ({ value, onChange, show }) => {
const TagList = ({ value, show }) => {
return (
<div>
{value.map(item => {
return <Tag>{item}</Tag>;
})}
{value.map(item => <Tag>{item}</Tag>)}
<Tag onClick={() => show()}>+</Tag>
</div>
);
};
class App extends React.Component {
class DrawerForm extends React.Component {
state = { visible: false, childrenDrawer: false };
showDrawer = () => {
this.setState({
@ -126,9 +124,9 @@ class App extends React.Component {
);
}
}
const WarpApp = Form.create()(App);
const App = Form.create()(DrawerForm);
ReactDOM.render(<WarpApp />, mountNode);
ReactDOM.render(<App />, mountNode);
```
<style>

2
components/drawer/index.tsx

@ -58,6 +58,7 @@ export default class Drawer extends React.Component<
closable: true,
placement: 'right',
maskClosable: true,
level: null,
};
close = (e: EventType) => {
@ -128,7 +129,6 @@ export default class Drawer extends React.Component<
}
return (
<RcDrawer
level={null}
{...rest}
handler={false}
open={this.props.visible}

Loading…
Cancel
Save