// @/mixins-scan.js import { addSubscription, removeSubscription } from "./scan"; export default { data() {}, onShow() { if (this.onReceiveCode) { addSubscription(this.onReceiveCode); } }, onHide() { if (this.onReceiveCode) { removeSubscription(this.onReceiveCode); } }, beforeDestroy() { if (this.onReceiveCode) { removeSubscription(this.onReceiveCode); } }, };