How to use the nuxt-property-decorator.Emit function in nuxt-property-decorator

To help you get started, we’ve selected a few nuxt-property-decorator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phamhongphuc / uit.hotel / uit.hotel.client / components / popup-context / bill / popup-book.vue View on Github external
if (index !== -1) row.patrons.splice(index, 1);
        });
    }

    removeRoom(roomId: number) {
        const index = this.tableData.findIndex(row => row.room.id === roomId);

        this.tableData.splice(index, 1);
    }

    nextResult() {
        return new Promise(resolve => this.$once('onResult', resolve));
    }

    @Emit('onResult')
    async onResult({ data }: ApolloQueryResult) {
        this.patrons = data.patrons;
        this.rooms = data.rooms;
    }
}