ant-design-vue/components/collapse/demo/mix.md

46 lines
1.1 KiB
Markdown
Raw Normal View History

2018-02-01 10:18:05 +00:00
<cn>
#### 面板嵌套
嵌套折叠面板。
</cn>
<us>
#### Nested panel
`Collapse` is nested inside the `Collapse`.
</us>
2019-10-09 10:32:23 +00:00
```tpl
2018-02-01 10:18:05 +00:00
<template>
<div>
<a-collapse @change="changeActivekey">
2018-02-02 08:34:27 +00:00
<a-collapse-panel header="This is panel header 1" key="1">
<a-collapse defaultActiveKey="4">
<a-collapse-panel header="This is panel nest panel" key="4">
2018-02-01 10:18:05 +00:00
<p>{{text}}</p>
</a-collapse-panel>
</a-collapse>
</a-collapse-panel>
2019-09-28 12:45:07 +00:00
<a-collapse-panel header="This is panel header 2" key="2" :disabled="false">
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">
2018-02-01 10:18:05 +00:00
<p>{{text}}</p>
</a-collapse-panel>
</a-collapse>
</div>
</template>
<script>
export default {
2019-09-28 12:45:07 +00:00
data() {
2018-02-01 10:32:17 +00:00
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.`,
2019-09-28 12:45:07 +00:00
};
2018-02-01 10:18:05 +00:00
},
2018-02-01 10:32:17 +00:00
methods: {
2019-09-28 12:45:07 +00:00
changeActivekey(key) {
console.log(key);
2018-02-01 10:32:17 +00:00
},
},
2019-09-28 12:45:07 +00:00
};
2018-02-01 10:18:05 +00:00
</script>
```