代码如下:
# 简单实用折叠面板可以折叠收起展开内容区域。
#### 使用方法
```使用方法
```
#### HTML代码部分
```html
```
#### JS代码 (引入组件 填充数据)
```javascript
import CCFoldView from "../../components/CCFoldView.vue"
export default {
components: {
CCFoldView
},
data() {
return {
isFoldOne: false,
isFoldTwo: false,
isFoldThree: false,
isFoldFour: false,
}
},
methods: {
foldClick(tag) {
if (tag == 1) {
this.isFoldOne = !this.isFoldOne;
} else if (tag == 2) {
this.isFoldTwo = !this.isFoldTwo;
}
else if (tag == 3) {
this.isFoldThree = !this.isFoldThree;
}
else if (tag == 4) {
this.isFoldFour = !this.isFoldFour;
}
}
},
}
```
#### CSS
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.chartV {
display: flex;
margin-left: 0px;
width: calc((100vw - 24px));
height: 260px;
}
```
参与评论
手机查看
返回顶部