mirror of
https://git.beihong.wang/wangbeihong/iot-bedroom-environment-controller.git
synced 2026-04-23 11:53:03 +08:00
31 lines
561 B
JavaScript
31 lines
561 B
JavaScript
Component({
|
|
data: {
|
|
children: []
|
|
},
|
|
relations: {
|
|
'../fui-swipe-action/fui-swipe-action': {
|
|
type: 'descendant',
|
|
linked: function (target) {
|
|
this.data.children.push(target)
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
close() {
|
|
this.data.children.forEach(child => {
|
|
child.setData({
|
|
isShow: false
|
|
})
|
|
})
|
|
},
|
|
closeAuto(child) {
|
|
this.data.children.forEach(item => {
|
|
if (item !== child) {
|
|
item.setData({
|
|
isShow: false
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}) |