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

vuex 支持延迟生成store #798

Merged
merged 3 commits into from
May 26, 2017
Merged

vuex 支持延迟生成store #798

merged 3 commits into from
May 26, 2017

Commits on May 24, 2017

  1. vuex 支持延迟生成store

    场景:
    组件树:(R为根组件;C1为R的子组件;C11、C12为C1的子组件, C11,C12下面还有很多下层组件)
    R
    |___C1
      |____C11
      |____C12
    |___C1
      |____C11
      |____C12
    |___C1
      |____C11
      |____C12
    
    C1的每个实例的数据显示是不一样的, 如果使用props传递数据,将会导致所有组件的实例要知道自己的index,不然不知道去修改哪个state。如果vuex支持延时创建store,那么在C1 上面延时生成store,下层组件使用$store的时候,不需要关心当前是哪个store的。
    liusanshi authored May 24, 2017
    Configuration menu
    Copy the full SHA
    155f56e View commit details
    Browse the repository at this point in the history
  2. Update mixin.js

    liusanshi authored May 24, 2017
    Configuration menu
    Copy the full SHA
    29b6c77 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2017

  1. 优化写法

    优化写法
    liusanshi authored May 26, 2017
    Configuration menu
    Copy the full SHA
    eab7002 View commit details
    Browse the repository at this point in the history