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

    importing components in standalone configuration not working..

    Help
    1
    2
    308
    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.
    • G
      gs86 last edited by

      Hello i am trying to import an exportFile component like this in a standalone quasar configuration on my existing project but it does not work…

      
      <script src="https://cdn.jsdelivr.net/npm/vue@^2.0.0/dist/vue.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/quasar@1.12.2/dist/quasar.umd.min.js"></script>
      
      <script>
      import { exportFile } from 'quasar';
      
      function wrapCsvValue (val, formatFn) {
        let formatted = formatFn !== void 0
          ? formatFn(val)
          : val
      
        formatted = formatted === void 0 || formatted === null
          ? ''
          : String(formatted)
      
        formatted = formatted.split('"').join('""')
        /**
         * Excel accepts \n and \r in strings, but some other CSV parsers do not
         * Uncomment the next two lines to escape new lines
         */
        // .split('\n').join('\\n')
        // .split('\r').join('\\r')
      
        return `"${formatted}"`
      }
      
      new Vue({
      el: '#q-app',
      data: function () {
      return { 
          loading: false,
          filter: "",
          arrData: [],
      

      Can somebody please advise the right way to do it as i could not find it in the docs…

      Thanks
      gs

      1 Reply Last reply Reply Quote 0
      • G
        gs86 last edited by gs86

        i have now figured out you need to import like this Quasar.utils.exportFile

        import { exportFile } from Quasar.utils.exportFile;
        
        

        might help someone who have this issue…

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