import '../assets/index.less';
import Collapse from '../index';
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.
`;
function random() {
return parseInt(Math.random() * 10, 10) + 1;
}
const { Panel } = Collapse;
export default {
data() {
return {
time: random(),
accordion: false,
activeKey: ['4'],
};
},
methods: {
onChange(activeKey) {
this.activeKey = activeKey;
},
getItems() {
const items = [];
for (let i = 0, len = 3; i < len; i++) {
const key = i + 1;
items.push(
{text.repeat(this.time)} {text} Panel with extra