From 30fe8fe37c9dd0445034d7101857dc850b764294 Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Fri, 18 Sep 2020 08:05:48 +0100 Subject: [PATCH] fix: introduce the wrapper object to the props default example --- src/guide/migration/props-default-this.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/guide/migration/props-default-this.md b/src/guide/migration/props-default-this.md index 56ddde52f9..965fd47080 100644 --- a/src/guide/migration/props-default-this.md +++ b/src/guide/migration/props-default-this.md @@ -19,11 +19,13 @@ import { inject } from 'vue' export default { props: { - theme: props => { - // `props` is the raw values passed to the component, - // before any type / default coercions - // can also use `inject` to access injected properties - return inject('theme', 'default-theme') + theme: { + default (props) { + // `props` is the raw values passed to the component, + // before any type / default coercions + // can also use `inject` to access injected properties + return inject('theme', 'default-theme') + } } } }