智慧教务系统UniApp前端项目(使用中2025-0517)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.0 KiB

<!--本文件由FirstUI授权予内蒙古晟誉网络科技有限责任公司手机号 1 51 48228 108身份证尾号1R6T39专用请尊重知识产权勿私下传播违者追究法律责任-->
<template>
<view class="fui-collapse__wrap">
<slot></slot>
</view>
</template>
<script>
export default {
name: 'fui-collapse',
emits: ['change'],
props: {
// 是否开启手风琴效果
accordion: {
type: Boolean,
default: false
}
},
created() {
this.children = []
},
methods: {
collapseChange(obj, isOpen, idx) {
if (this.accordion && isOpen) {
this.children.forEach((item, index) => {
if (item !== obj) {
item.isOpen = false
}
})
}
this.$emit('change', {
index: idx,
isOpen: isOpen
})
}
}
}
</script>
<style scoped>
.fui-collapse__wrap {
/* #ifndef APP-NVUE */
width: 100%;
display: flex;
/* #endif */
/* #ifdef APP-NVUE */
flex: 1;
/* #endif */
flex-direction: column;
background: #fff;
}
</style>