fix the context.emit functions
This commit is contained in:
parent
3065481a78
commit
3d51a62a14
|
@ -13,9 +13,9 @@
|
||||||
export default {
|
export default {
|
||||||
props: ['searchTerm'],
|
props: ['searchTerm'],
|
||||||
emits: ['search'],
|
emits: ['search'],
|
||||||
setup(_, { emit }) {
|
setup(_, context) {
|
||||||
function search(event) {
|
function search(event) {
|
||||||
emit('search', event.target.value);
|
context.emit('search', event.target.value);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
search
|
search
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
export default {
|
export default {
|
||||||
props: ['id', 'userName'],
|
props: ['id', 'userName'],
|
||||||
emits: ['list-projects'],
|
emits: ['list-projects'],
|
||||||
setup(props, { emit }) {
|
setup(props, context) {
|
||||||
function viewProjects() {
|
function viewProjects() {
|
||||||
emit('list-projects', props.id);
|
context.emit('list-projects', props.id);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
viewProjects
|
viewProjects
|
||||||
|
|
Reference in New Issue