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.
29 lines
651 B
29 lines
651 B
import {
|
|
isFn
|
|
} from 'uni-shared'
|
|
|
|
export default {
|
|
data () {
|
|
return {
|
|
showActionSheet: {
|
|
visible: false
|
|
}
|
|
}
|
|
},
|
|
created () {
|
|
UniServiceJSBridge.on('onShowActionSheet', (args, callback) => {
|
|
this.showActionSheet = args
|
|
this.onActionSheetCloseCallback = callback
|
|
})
|
|
UniServiceJSBridge.on('onHidePopup', args => {
|
|
this.showActionSheet.visible = false
|
|
})
|
|
},
|
|
methods: {
|
|
// 处理 actionSheet close 回调
|
|
_onActionSheetClose (type) {
|
|
this.showActionSheet.visible = false
|
|
isFn(this.onActionSheetCloseCallback) && this.onActionSheetCloseCallback(type)
|
|
}
|
|
}
|
|
}
|
|
|