@deanwu/vue-component-library 1.2.20 → 1.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102486,13 +102486,24 @@ function createStore(data) {
102486
102486
  i18n: components_i18n
102487
102487
  });
102488
102488
  }
102489
+ function getStore(vm) {
102490
+ let store;
102491
+ !function loop(vm) {
102492
+ if (vm.store) {
102493
+ store = vm.store;
102494
+ } else if (vm) {
102495
+ loop(vm.$parent);
102496
+ }
102497
+ }(vm);
102498
+ return store;
102499
+ }
102489
102500
  function mapStore(data) {
102490
102501
  const res = {};
102491
102502
  if (data.constructor == Array) {
102492
102503
  data.forEach(key => {
102493
102504
  res[key] = {
102494
102505
  get() {
102495
- return this.store[key];
102506
+ return getStore(this)[key];
102496
102507
  },
102497
102508
  set() {}
102498
102509
  };
@@ -102501,7 +102512,7 @@ function mapStore(data) {
102501
102512
  for (let key in data) {
102502
102513
  res[key] = {
102503
102514
  get() {
102504
- return data[key](this.store);
102515
+ return data[key](getStore(this));
102505
102516
  },
102506
102517
  set() {}
102507
102518
  };