If a component has two properties, where one is default initialized and the other is initialized in the created() hook:
<template>
<div>TESTTT</div>
</template>
<script lang="ts">
import { Vue, Options, Prop } from "vue-property-decorator";
@Options({
name: "Test",
components: {},
})
export default class Test extends Vue {
first = 1;
second!: number;
created() {
this.second = 1;
}
}
</script>
The vue-devtools is not able to detect the properties that are not directly default initialized...
As we can see on the screen below:
Only the first property appear in the setup part but not second.
This is an important problem, a lot of our properties can't be directly initialized, and adding a default value like null is not often desirable.
Hope someone can solve this issue @posva @ktsn
Hello,
If a component has two properties, where one is default initialized and the other is initialized in the
created()
hook:The vue-devtools is not able to detect the properties that are not directly default initialized... As we can see on the screen below:
Only the
first
property appear in the setup part but notsecond
.This is an important problem, a lot of our properties can't be directly initialized, and adding a default value like null is not often desirable. Hope someone can solve this issue @posva @ktsn