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
    1. Home
    2. Fragster
    F
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 4
    • Best 0
    • Groups 0

    Fragster

    @Fragster

    0
    Reputation
    5
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Fragster Follow

    Latest posts made by Fragster

    • RE: Is there proper way to set default values to component props?

      I was thinking about this, but in this case, the auto-import feature is lost, so i need import component globally, or in every place.
      Also I need use my names for components. And I finally - lost Vetur autocompletion in templates 😞

      posted in Help
      F
      Fragster
    • RE: Is there proper way to set default values to component props?

      My fault! interference with other components with same props. E.g. fab has ‘square’ prop, but i want to set default only for q-filed and q-input. Or no-caps only for buttons, not for q-tabs. Is there some way to configure default values for props for definite component?
      (sorry for bad english 😞 )

      posted in Help
      F
      Fragster
    • Is there proper way to set default values to component props?

      e.g. I want to set default no-caps for all q-btn, q-tabs (and everywhere), i can use dirty hack with global mixin in boot file:

      export default function ({ Vue }) {
        const strategies = Vue.config.optionMergeStrategies
        strategies.props = function (parent, child) {
          const result = { ...parent, ...child }
          if (parent?.noCaps) {
            result.noCaps = parent.noCaps
          }
          return result
        }
        Vue.mixin({
          props: {
            noCaps: {
              type: Boolean, default: true
            }
          }
        })
        // strategies.props = strategies.methods
      }
      
      

      but what if I want to set all my q-input and q-field “square filled” without interference with q-card?

      posted in Help
      F
      Fragster
    • How to use vuex store without access to vue instance?

      E.g in beforeRouteEnter hook?
      I try make it in this way (store is dynamically filled in boot folder):

      import StoreFunction from 'store';
      const store = StoreFunction();
      ...
      export default {
      
        beforeRouteEnter(to, from, next) {
          if (store.state.catalog.loading) next({to: 'routename'});
          else next();
        }
      

      but it causes an error “do not mutate vuex store state outside mutation handlers.”

      to fix it, I change store/index.js to return store instance instead of function, and it works. But I’m worrying about possible side effects of this ‘fix’.

      //export default function(/* { ssrContext } */) {
        export default new Vuex.Store({
      

      Is this right fix, or there is another ‘proper’ way in my case?

      posted in Framework
      F
      Fragster