No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    export default {} doesn't work

    Help
    2
    3
    771
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      ZIOLele1980 last edited by

      Hi all,
      I’m trying to create my first vue component, as from documentation, i’m using quasar-cli for quick creation of the component, and importing it in the page i want to use it ( so no global inport).

      The problem is that babel spits a warning like this:
      "export ‘EptsUserList’ was not found in ‘…/components/userList’
      and in my component i’ve:

      <template>
      <q-table title=“Users” :data=“tableData” :columns=“columns” row-key=“name”/>
      </template>

      <script>
      export default {
      name: ‘EptsUserList’,
      props: {},
      data () {
      return {
      columns: [],
      tableData:[]
      }
      }
      }
      </script>
      in my page i do simply (i’m putting just the code for the <script></script> tag):

      import { EptsUserList } from ‘…/components/userList’

      export default {
      name: ‘PageUsersList’,
      components: {
      EptsUserList
      }
      }

      where i’m doing it wrong?

      1 Reply Last reply Reply Quote 0
      • J
        jeffatpf last edited by

        Without seeing the source of “…/components/userList” I would try two things (1) verify that the path to userList within the components folder is correct and (2) change “import { EptsUserList } from …” to “import EptsUserList from …” (remove the {}).

        1 Reply Last reply Reply Quote 0
        • Z
          ZIOLele1980 last edited by

          It lives! thanks!!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post