mirror of https://github.com/vuejs/core.git
fix(runtime-vapor): apiLifeCycle circular dependencies (#244)
This commit is contained in:
parent
d4511150a5
commit
be6a2d1d35
|
@ -11,21 +11,7 @@ import {
|
||||||
} from '@vue/reactivity'
|
} from '@vue/reactivity'
|
||||||
import { ErrorTypeStrings, callWithAsyncErrorHandling } from './errorHandling'
|
import { ErrorTypeStrings, callWithAsyncErrorHandling } from './errorHandling'
|
||||||
import { toHandlerKey } from '@vue/shared'
|
import { toHandlerKey } from '@vue/shared'
|
||||||
|
import { VaporLifecycleHooks } from './enums'
|
||||||
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',
|
|
||||||
}
|
|
||||||
|
|
||||||
const injectHook = (
|
const injectHook = (
|
||||||
type: VaporLifecycleHooks,
|
type: VaporLifecycleHooks,
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
import { insert, querySelector, remove } from './dom/element'
|
import { insert, querySelector, remove } from './dom/element'
|
||||||
import { flushPostFlushCbs, queuePostFlushCb } from './scheduler'
|
import { flushPostFlushCbs, queuePostFlushCb } from './scheduler'
|
||||||
import { invokeLifecycle } from './componentLifecycle'
|
import { invokeLifecycle } from './componentLifecycle'
|
||||||
import { VaporLifecycleHooks } from './apiLifecycle'
|
import { VaporLifecycleHooks } from './enums'
|
||||||
import {
|
import {
|
||||||
pauseTracking,
|
pauseTracking,
|
||||||
proxyRefs,
|
proxyRefs,
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
normalizeEmitsOptions,
|
normalizeEmitsOptions,
|
||||||
} from './componentEmits'
|
} from './componentEmits'
|
||||||
import { type RawSlots, type StaticSlots, initSlots } from './componentSlots'
|
import { type RawSlots, type StaticSlots, initSlots } from './componentSlots'
|
||||||
import { VaporLifecycleHooks } from './apiLifecycle'
|
import { VaporLifecycleHooks } from './enums'
|
||||||
import { warn } from './warning'
|
import { warn } from './warning'
|
||||||
import {
|
import {
|
||||||
type AppConfig,
|
type AppConfig,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { invokeArrayFns } from '@vue/shared'
|
import { invokeArrayFns } from '@vue/shared'
|
||||||
import type { VaporLifecycleHooks } from './apiLifecycle'
|
import type { VaporLifecycleHooks } from './enums'
|
||||||
import { type ComponentInternalInstance, setCurrentInstance } from './component'
|
import { type ComponentInternalInstance, setCurrentInstance } from './component'
|
||||||
import { queuePostFlushCb } from './scheduler'
|
import { queuePostFlushCb } from './scheduler'
|
||||||
import { type DirectiveHookName, invokeDirectiveHook } from './directives'
|
import { type DirectiveHookName, invokeDirectiveHook } from './directives'
|
||||||
|
|
|
@ -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',
|
||||||
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
import type { ComponentInternalInstance } from './component'
|
import type { ComponentInternalInstance } from './component'
|
||||||
import { isFunction, isPromise } from '@vue/shared'
|
import { isFunction, isPromise } from '@vue/shared'
|
||||||
import { warn } from './warning'
|
import { warn } from './warning'
|
||||||
import { VaporLifecycleHooks } from './apiLifecycle'
|
import { VaporLifecycleHooks } from './enums'
|
||||||
import {
|
import {
|
||||||
BaseWatchErrorCodes,
|
BaseWatchErrorCodes,
|
||||||
pauseTracking,
|
pauseTracking,
|
||||||
|
|
Loading…
Reference in New Issue