@pinegrow/vite-plugin 3.0.0-beta.47 → 3.0.0-beta.48
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-plugin.js +17 -14
- package/package.json +1 -1
package/dist/vue-plugin.js
CHANGED
|
@@ -43,17 +43,20 @@ export function usePinegrow() {
|
|
|
43
43
|
if (
|
|
44
44
|
value.instance.isMounted &&
|
|
45
45
|
!value.instance.isUnmounted &&
|
|
46
|
-
value.
|
|
46
|
+
value.pgIds &&
|
|
47
|
+
value.pgIds.length &&
|
|
47
48
|
(!value.rootEl || value.isRootFragment)
|
|
48
49
|
) {
|
|
49
|
-
|
|
50
|
-
pgIds[
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
value.pgIds.forEach(pgId => {
|
|
51
|
+
if (!pgIds[pgId]) {
|
|
52
|
+
pgIds[pgId] = []
|
|
53
|
+
}
|
|
54
|
+
if (value.key === undefined || value.key === null) {
|
|
55
|
+
pgIds[pgId].push(value)
|
|
56
|
+
} else {
|
|
57
|
+
pgIds[pgId].push([value.key, value])
|
|
58
|
+
}
|
|
59
|
+
})
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
return pgIds
|
|
@@ -149,10 +152,10 @@ export function usePinegrow() {
|
|
|
149
152
|
// return
|
|
150
153
|
// }
|
|
151
154
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (pgId) {
|
|
155
|
-
|
|
155
|
+
const prevElCache = pinegrow.elCache.get(el)
|
|
156
|
+
if (prevElCache) {
|
|
157
|
+
if (pgId && !prevElCache.pgIds.includes(pgId)) {
|
|
158
|
+
prevElCache.pgIds.push(pgId)
|
|
156
159
|
}
|
|
157
160
|
if (key !== null && key !== undefined) {
|
|
158
161
|
pinegrow.elCache.get(el).key = key
|
|
@@ -246,7 +249,7 @@ export function usePinegrow() {
|
|
|
246
249
|
isFragment,
|
|
247
250
|
firstEl,
|
|
248
251
|
lastEl,
|
|
249
|
-
pgId,
|
|
252
|
+
pgIds: pgId ? [pgId] : [],
|
|
250
253
|
key,
|
|
251
254
|
localFile,
|
|
252
255
|
isIsland,
|