skip to Main Content

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


  1. Probably naming problem

    The param of draftSearched (search) and the import (search) is the same, try to change it to different names

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search