fix the context.emit functions

This commit is contained in:
Andreas Zweili 2021-09-06 22:13:17 +02:00
parent 3065481a78
commit 3d51a62a14
2 changed files with 4 additions and 4 deletions

View File

@ -13,9 +13,9 @@
export default {
props: ['searchTerm'],
emits: ['search'],
setup(_, { emit }) {
setup(_, context) {
function search(event) {
emit('search', event.target.value);
context.emit('search', event.target.value);
}
return {
search

View File

@ -9,9 +9,9 @@
export default {
props: ['id', 'userName'],
emits: ['list-projects'],
setup(props, { emit }) {
setup(props, context) {
function viewProjects() {
emit('list-projects', props.id);
context.emit('list-projects', props.id);
}
return {
viewProjects