I’m expecting to call the function that is previously imported. But I see no result.
<script>
import { search } from '../modules/api/drafts'
...
methods: {
draftSearched (payload, search = this.search) {
console.log('search', search)
}
}
</script>
2
Answers
Probably naming problem
The param of draftSearched (search) and the import (search) is the same, try to change it to different names
Are you trying to import a function or a variable from ‘../modules/api/drafts’?, If you are importing a function you could try to explicitly mention the function while importing. Something like this import { draftSearched } from ‘../modules/api/drafts’ Need clear description to answer