[Vuejs]-Vue Prop not defined, and/or cannot be used on v-for. Using typescript and decorators

3👍

I fixed that. Well the error was i was not using the @Component decorator, then Vue could not compile props. Code fixed below.

<script lang="ts">
import { Prop, Vue, Component} from "vue-property-decorator";

@Component
export default class Menu extends Vue {
  @Prop() private list!: string[];
}
</script>
👤pleshw

Leave a comment