feat: multi-listener bridge + subscribe/unsubscribe in index page
This commit is contained in:
@@ -71,7 +71,7 @@ export default {
|
||||
},
|
||||
|
||||
onReady() {
|
||||
bridge.init({
|
||||
this._unsub = bridge.subscribe({
|
||||
status: (s) => {
|
||||
this.statusText = s
|
||||
this.connText = s
|
||||
@@ -80,6 +80,11 @@ export default {
|
||||
this.handleBridgeMessage(msg)
|
||||
}
|
||||
})
|
||||
bridge.refreshConn()
|
||||
},
|
||||
|
||||
onDestroy() {
|
||||
if (this._unsub) this._unsub()
|
||||
},
|
||||
|
||||
onSwipeChange(e) {
|
||||
|
||||
Reference in New Issue
Block a user