2018-02-01 10:18:05 +00:00
< cn >
#### 自定义面板
自定义各个面板的背景色、圆角和边距。
< / cn >
< us >
#### Custom Panel
Customize the background, border and margin styles for each panel.
< / us >
```html
< template >
< div >
2018-02-02 08:34:27 +00:00
< a-collapse defaultActiveKey = "1" :bordered = "false" >
2018-02-02 09:19:42 +00:00
< a-collapse-panel key = "1" :style = "customStyle" >
< template slot = "header" >
This is panel header 1< a-icon type = "question-circle-o" / >
< / template >
2018-02-01 10:18:05 +00:00
< p > {{text}}< / p >
< / a-collapse-panel >
2018-02-02 08:34:27 +00:00
< a-collapse-panel header = "This is panel header 2" key = "2" :style = "customStyle" >
2018-02-01 10:18:05 +00:00
< p > {{text}}< / p >
< / a-collapse-panel >
2018-02-02 08:34:27 +00:00
< a-collapse-panel header = "This is panel header 3" key = "3" :style = "customStyle" >
2018-02-01 10:18:05 +00:00
< p > {{text}}< / p >
< / a-collapse-panel >
< / a-collapse >
< / div >
< / template >
< script >
export default {
2018-02-01 10:32:17 +00:00
data () {
return {
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.` ,
customStyle: 'background: #f7f7f7 ;border-radius: 4px;margin-bottom: 24px;border: 0;overflow: hidden'
}
},
}
2018-02-01 10:18:05 +00:00
< / script >
```