Skip to content

init data by access props is undefinded #619

Open
@kagaricyan

Description

@kagaricyan

code example:

<template>
  <span>{{ test }}-{{ local }}</span>
</template>

<script>
import { Component, Prop, Vue } from 'vue-property-decorator';

@Component
export default class HelloWorld extends Vue {
  @Prop({default: ()=>({aaa: 456})}) msg;

  local = JSON.parse(JSON.stringify(this.msg));

  get test() {
    return this.msg.aaa;
  }
}
</script>

this code is works in lower version. recent days,i want to upgrade my dependencies, but get problems with this code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions