@vue-composable/web
Advanced tools
Comparing version
@@ -1053,6 +1053,10 @@ 'use strict'; | ||
getItem(k) { | ||
let r = this.$refMap.get(k); | ||
if (r) { | ||
return r; | ||
} | ||
/** | ||
* NOTE seems if the element who created the `ref` gets destroyed all the watchers assigned will be also disposed | ||
* making returning of the cached `ref` invalid | ||
*/ | ||
// let r = this.$refMap.get(k); | ||
// if (r) { | ||
// return r; | ||
// } | ||
const data = storage.getItem(k); | ||
@@ -1059,0 +1063,0 @@ if (!data) { |
@@ -1009,6 +1009,10 @@ 'use strict'; | ||
getItem(k) { | ||
let r = this.$refMap.get(k); | ||
if (r) { | ||
return r; | ||
} | ||
/** | ||
* NOTE seems if the element who created the `ref` gets destroyed all the watchers assigned will be also disposed | ||
* making returning of the cached `ref` invalid | ||
*/ | ||
// let r = this.$refMap.get(k); | ||
// if (r) { | ||
// return r; | ||
// } | ||
const data = storage.getItem(k); | ||
@@ -1015,0 +1019,0 @@ if (!data) { |
@@ -1052,6 +1052,10 @@ import { onUnmounted, onMounted, watch, ref, isRef, computed, getCurrentInstance, provide, inject } from '@vue/composition-api'; | ||
getItem(k) { | ||
let r = this.$refMap.get(k); | ||
if (r) { | ||
return r; | ||
} | ||
/** | ||
* NOTE seems if the element who created the `ref` gets destroyed all the watchers assigned will be also disposed | ||
* making returning of the cached `ref` invalid | ||
*/ | ||
// let r = this.$refMap.get(k); | ||
// if (r) { | ||
// return r; | ||
// } | ||
const data = storage.getItem(k); | ||
@@ -1058,0 +1062,0 @@ if (!data) { |
{ | ||
"name": "@vue-composable/web", | ||
"version": "1.0.0-dev.12", | ||
"version": "1.0.0-dev.13", | ||
"description": "@vue-composable/web", | ||
@@ -39,6 +39,6 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"@vue/composition-api": "^0.3.4" | ||
"@vue/composition-api": "^0.4.0" | ||
}, | ||
"dependencies": { | ||
"@vue-composable/core": "1.0.0-dev.12" | ||
"@vue-composable/core": "1.0.0-dev.13" | ||
}, | ||
@@ -45,0 +45,0 @@ "devDependencies": { |
141334
0.56%3907
0.31%+ Added
+ Added
- Removed
- Removed