2017-12-13 23:23:38 +08:00
|
|
|
---
|
|
|
|
order: 4
|
|
|
|
title:
|
2017-12-29 20:53:21 +08:00
|
|
|
zh-CN: 隐藏箭头
|
2017-12-13 23:23:38 +08:00
|
|
|
en-US: No arrow
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
2017-12-29 20:53:21 +08:00
|
|
|
你可以通过 `showArrow={false}` 隐藏 `CollapsePanel` 组件的箭头图标。
|
2017-12-13 23:23:38 +08:00
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2019-04-20 06:34:56 +08:00
|
|
|
You can hide the arrow icon by passing `showArrow={false}` to `CollapsePanel` component.
|
2017-12-13 23:23:38 +08:00
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```jsx
|
2017-12-13 23:23:38 +08:00
|
|
|
import { Collapse } from 'antd';
|
2018-06-27 15:55:04 +08:00
|
|
|
|
2017-12-13 23:23:38 +08:00
|
|
|
const Panel = Collapse.Panel;
|
|
|
|
|
|
|
|
function callback(key) {
|
|
|
|
console.log(key);
|
|
|
|
}
|
|
|
|
|
|
|
|
const text = `
|
|
|
|
A dog is a type of domesticated animal.
|
|
|
|
Known for its loyalty and faithfulness,
|
|
|
|
it can be found as a welcome guest in many households across the world.
|
|
|
|
`;
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Collapse defaultActiveKey={['1']} onChange={callback}>
|
|
|
|
<Panel header="This is panel header with arrow icon" key="1">
|
|
|
|
<p>{text}</p>
|
|
|
|
</Panel>
|
|
|
|
<Panel showArrow={false} header="This is panel header with no arrow icon" key="2">
|
|
|
|
<p>{text}</p>
|
|
|
|
</Panel>
|
2018-06-27 15:55:04 +08:00
|
|
|
</Collapse>,
|
2019-05-07 14:57:32 +08:00
|
|
|
mountNode,
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|