Thanks @a47ae for this complete and usefull reply !!
Posts made by damosse31
Deploy and upgrade quasar app
Hi all !
I want to know what is the best way to upgrade my quasar application (SPA) in production.
When I finished my dev with “quasar dev” I use “quasar build” to pack my application in dist folder.
- Do I need to delete old dist folder before build ?
- How can be sure my users have the latest version of my app in the cache ?
Wich process do you use guys for your apps ?
I use quasar 0.13
Disable fastclick on 0.13 ?
Is there any solution to disable fastclick globally on quasar 0.13 ?
I have some problems in my app with somes plugins like Google Autocomplete or Quill Editor on mobile.
I tried to remove fastclick package via npm but of course Quasar need it to compile
Best way to manage modals forms
Dear Quasarians !
In my project I have some forms in q-modal (ex: for user edit profile)
Actually I manage modals as below:
Modal that don’t need any return : (ex: Edit User Profile)
- I create a component modalEditUser.vue who contain a q-modal and all my inputs form inside
- I declare an open() method inside my modalEditUser.vue
- From my parent page, I declare the modalEditUser component and I call open() with this.$refs.myComponentRef.open() when I need to open it.
- Inside component the user is loaded from open() method (I call the user from ajax API)
- When the modal is validated, I check for fields validation and post on API then I close the modal (this.$refs.xxxx.close())
Modal that need to return an object to parent : (ex: an Invoice item return to Invoice parent)
- I create a component modalEditItem.vue who contain a q-modal and all my inputs form to edit the item (price, ref, VAT etc…)
- I declare an open() method who contain an item object in parameter : open(item)
- I declare props OnReturnItem who is function and return the edited item if the modal is validated
- From my Invoice parent, I declare the modal component and I call it with open(itemToEdit)
- When user click to the Save button in modal, the modal close and call OnReturnItem function
- In this case, I can use OnReturnItem from parent page (Invoice) to manage my edited item from modal (ex: add it in items array etc…)
I think there is a better solutions to manage modals from parent but… yeah, that is the question What do you think about ?