57 lines
1.2 KiB
Vue
57 lines
1.2 KiB
Vue
<!--本文件由FirstUI授权予新疆天衡创新研究院有限公司(手机号: 18 6 14 0 7 25 49,身份证尾号:5A07X5)专用,请尊重知识产权,勿私下传播,违者追究法律责任。-->
|
||
<template>
|
||
<view>
|
||
<slot></slot>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
name: "fui-swipeaction-group",
|
||
data() {
|
||
return {};
|
||
},
|
||
created() {
|
||
this.children = [];
|
||
},
|
||
methods: {
|
||
reset() {
|
||
// wxs 会自己计算组件大小,所以无需执行下面代码
|
||
// #ifndef APP-VUE || H5 || MP-WEIXIN
|
||
this.children.forEach(child => {
|
||
child.init()
|
||
})
|
||
// #endif
|
||
},
|
||
close() {
|
||
this.children.forEach(child => {
|
||
// #ifdef APP-VUE || H5 || MP-WEIXIN
|
||
child.isShow = false;
|
||
// #endif
|
||
|
||
// #ifndef APP-VUE || H5 || MP-WEIXIN
|
||
child.close()
|
||
// #endif
|
||
})
|
||
},
|
||
closeAuto(child) {
|
||
// #ifndef APP-VUE || H5 || MP-WEIXIN
|
||
if (this.openItem && this.openItem !== child) {
|
||
this.openItem.close()
|
||
}
|
||
this.openItem = child
|
||
// #endif
|
||
|
||
// #ifdef APP-VUE || H5 || MP-WEIXIN
|
||
this.children.forEach(item => {
|
||
if (item !== child) {
|
||
item.isShow = false;
|
||
}
|
||
})
|
||
// #endif
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped></style> |