@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.
- package/dist/vue-component-library.common.js +13 -2
- package/dist/vue-component-library.common.js.map +1 -1
- package/dist/vue-component-library.umd.js +13 -2
- package/dist/vue-component-library.umd.js.map +1 -1
- package/dist/vue-component-library.umd.min.js +1 -1
- package/dist/vue-component-library.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -102477,13 +102477,24 @@ function createStore(data) {
|
|
|
102477
102477
|
i18n: components_i18n
|
|
102478
102478
|
});
|
|
102479
102479
|
}
|
|
102480
|
+
function getStore(vm) {
|
|
102481
|
+
let store;
|
|
102482
|
+
!function loop(vm) {
|
|
102483
|
+
if (vm.store) {
|
|
102484
|
+
store = vm.store;
|
|
102485
|
+
} else if (vm) {
|
|
102486
|
+
loop(vm.$parent);
|
|
102487
|
+
}
|
|
102488
|
+
}(vm);
|
|
102489
|
+
return store;
|
|
102490
|
+
}
|
|
102480
102491
|
function mapStore(data) {
|
|
102481
102492
|
const res = {};
|
|
102482
102493
|
if (data.constructor == Array) {
|
|
102483
102494
|
data.forEach(key => {
|
|
102484
102495
|
res[key] = {
|
|
102485
102496
|
get() {
|
|
102486
|
-
return this
|
|
102497
|
+
return getStore(this)[key];
|
|
102487
102498
|
},
|
|
102488
102499
|
set() {}
|
|
102489
102500
|
};
|
|
@@ -102492,7 +102503,7 @@ function mapStore(data) {
|
|
|
102492
102503
|
for (let key in data) {
|
|
102493
102504
|
res[key] = {
|
|
102494
102505
|
get() {
|
|
102495
|
-
return data[key](this
|
|
102506
|
+
return data[key](getStore(this));
|
|
102496
102507
|
},
|
|
102497
102508
|
set() {}
|
|
102498
102509
|
};
|