feat: onServerPrefetch (#3070)
Support equivalent of `serverPrefetch` option via Composition API.
This commit is contained in:
@@ -40,7 +40,8 @@ import {
|
||||
onDeactivated,
|
||||
onRenderTriggered,
|
||||
DebuggerHook,
|
||||
ErrorCapturedHook
|
||||
ErrorCapturedHook,
|
||||
onServerPrefetch
|
||||
} from './apiLifecycle'
|
||||
import {
|
||||
reactive,
|
||||
@@ -555,6 +556,7 @@ export function applyOptions(
|
||||
renderTracked,
|
||||
renderTriggered,
|
||||
errorCaptured,
|
||||
serverPrefetch,
|
||||
// public API
|
||||
expose
|
||||
} = options
|
||||
@@ -798,6 +800,9 @@ export function applyOptions(
|
||||
if (unmounted) {
|
||||
onUnmounted(unmounted.bind(publicThis))
|
||||
}
|
||||
if (serverPrefetch) {
|
||||
onServerPrefetch(serverPrefetch.bind(publicThis))
|
||||
}
|
||||
|
||||
if (__COMPAT__) {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user