Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules have same prop in state will be override when mergeProps in components #2

Closed
dwqs opened this issue Aug 27, 2017 · 0 comments
Closed

Comments

@dwqs
Copy link
Owner

dwqs commented Aug 27, 2017

I have a module and b module, both states have the same title prop:

//a module
export default {
    namespace: 'a',
    state: {
          title: 'a module'
    }
}

//b module
export default {
    namespace: 'b',
    state: {
          title: 'b module'
    }
}

when merging title prop to vue component:

// ...

export default {
       // ...
       computed: {
            ...mergeProps({
                  'titlea': 'a.title',
                  'titleb': 'b.title'
            })
       } 
      // ...
}

// ...

The titlea and titleb have the same value: a module or b module.
What's expected is that titlea is a module and titleb is b module.

@dwqs dwqs changed the title modules hava same prop in state will be override when mergeProps in compoennts modules have same prop in state will be override when mergeProps in components Aug 27, 2017
@dwqs dwqs closed this as completed in ff36a82 Aug 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant