Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions packages/runtime-vapor/src/apiLifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,7 @@ import {
} from '@vue/reactivity'
import { ErrorTypeStrings, callWithAsyncErrorHandling } from './errorHandling'
import { toHandlerKey } from '@vue/shared'

export enum VaporLifecycleHooks {
BEFORE_MOUNT = 'bm',
MOUNTED = 'm',
BEFORE_UPDATE = 'bu',
UPDATED = 'u',
BEFORE_UNMOUNT = 'bum',
UNMOUNTED = 'um',
DEACTIVATED = 'da',
ACTIVATED = 'a',
RENDER_TRIGGERED = 'rtg',
RENDER_TRACKED = 'rtc',
ERROR_CAPTURED = 'ec',
// SERVER_PREFETCH = 'sp',
}
import { VaporLifecycleHooks } from './enums'

const injectHook = (
type: VaporLifecycleHooks,
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-vapor/src/apiRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { insert, querySelector, remove } from './dom/element'
import { flushPostFlushCbs, queuePostFlushCb } from './scheduler'
import { invokeLifecycle } from './componentLifecycle'
import { VaporLifecycleHooks } from './apiLifecycle'
import { VaporLifecycleHooks } from './enums'
import {
pauseTracking,
proxyRefs,
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-vapor/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
normalizeEmitsOptions,
} from './componentEmits'
import { type RawSlots, type StaticSlots, initSlots } from './componentSlots'
import { VaporLifecycleHooks } from './apiLifecycle'
import { VaporLifecycleHooks } from './enums'
import { warn } from './warning'
import {
type AppConfig,
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-vapor/src/componentLifecycle.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { invokeArrayFns } from '@vue/shared'
import type { VaporLifecycleHooks } from './apiLifecycle'
import type { VaporLifecycleHooks } from './enums'
import { type ComponentInternalInstance, setCurrentInstance } from './component'
import { queuePostFlushCb } from './scheduler'
import { type DirectiveHookName, invokeDirectiveHook } from './directives'
Expand Down
14 changes: 14 additions & 0 deletions packages/runtime-vapor/src/enums.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export enum VaporLifecycleHooks {
BEFORE_MOUNT = 'bm',
MOUNTED = 'm',
BEFORE_UPDATE = 'bu',
UPDATED = 'u',
BEFORE_UNMOUNT = 'bum',
UNMOUNTED = 'um',
DEACTIVATED = 'da',
ACTIVATED = 'a',
RENDER_TRIGGERED = 'rtg',
RENDER_TRACKED = 'rtc',
ERROR_CAPTURED = 'ec',
// SERVER_PREFETCH = 'sp',
}
2 changes: 1 addition & 1 deletion packages/runtime-vapor/src/errorHandling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import type { ComponentInternalInstance } from './component'
import { isFunction, isPromise } from '@vue/shared'
import { warn } from './warning'
import { VaporLifecycleHooks } from './apiLifecycle'
import { VaporLifecycleHooks } from './enums'
import {
BaseWatchErrorCodes,
pauseTracking,
Expand Down