wip: root mount api compat

This commit is contained in:
Evan You
2021-04-05 11:54:35 -04:00
parent 24850a99c6
commit e2d6ff845b
7 changed files with 228 additions and 30 deletions

View File

@@ -1,5 +1,7 @@
export const enum DeprecationTypes {
DOM_TEMPLATE_MOUNT
DOM_TEMPLATE_MOUNT,
$MOUNT,
$DESTROY
}
type DeprecationData = {
@@ -14,6 +16,18 @@ const deprecations: Record<DeprecationTypes, DeprecationData> = {
`In Vue 3, the container is no longer considered part of the template ` +
`and will not be processed/replaced.`,
link: `https://v3.vuejs.org/guide/migration/mount-changes.html`
},
[DeprecationTypes.$MOUNT]: {
message:
`vm.$mount() has been deprecated. ` +
`Use createApp(RootComponent).mount() instead.`,
link: `https://v3.vuejs.org/guide/migration/global-api.html#mounting-app-instance`
},
[DeprecationTypes.$DESTROY]: {
message: `vm.$destroy() has been deprecated. Use app.unmount() instead.`,
link: `https://v3.vuejs.org/api/application-api.html#unmount`
}
}