]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: avoid using process as function name
authordaiwei <daiwei521@126.com>
Fri, 18 Apr 2025 02:08:52 +0000 (10:08 +0800)
committerdaiwei <daiwei521@126.com>
Fri, 18 Apr 2025 02:08:52 +0000 (10:08 +0800)
packages/runtime-vapor/src/components/KeepAlive.ts

index 0674cd5a8ee7ebe198e4ac40768597b709f64e4a..b785f38456019b42306bad1ea93e9cb09a4ca15a 100644 (file)
@@ -66,9 +66,9 @@ export const VaporKeepAliveImpl: ObjectVaporComponent = defineVaporComponent({
     const storageContainer = createElement('div')
     let current: VaporComponentInstance | VaporFragment | undefined
 
-    // if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
-    //   ;(keepAliveInstance as any).__v_cache = cache
-    // }
+    if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
+      ;(keepAliveInstance as any).__v_cache = cache
+    }
 
     function shouldCache(instance: VaporComponentInstance) {
       const { include, exclude } = props
@@ -136,7 +136,7 @@ export const VaporKeepAliveImpl: ObjectVaporComponent = defineVaporComponent({
     keepAliveInstance.getStorageContainer = () => storageContainer
     keepAliveInstance.getCachedComponent = comp => cache.get(comp)
 
-    const process = (keepAliveInstance.process = block => {
+    const processShapeFlag = (keepAliveInstance.process = block => {
       const instance = getInnerComponent(block)
       if (!instance) return
 
@@ -170,7 +170,7 @@ export const VaporKeepAliveImpl: ObjectVaporComponent = defineVaporComponent({
     // (when using `v-if` or `<component is/>`). For `DynamicFragment` children,
     // the `shapeFlag` is processed in `DynamicFragment.update`. Here only need
     // to process the `VaporComponentInstance`
-    if (isVaporComponent(children)) process(children)
+    if (isVaporComponent(children)) processShapeFlag(children)
 
     function pruneCache(filter: (name: string) => boolean) {
       cache.forEach((instance, key) => {