1

私が使用nativescript vueしていて、for ループを実行する方法を知りたい..私が今持っているコードは次のとおりです。

<template>
    <GridLayout columns="0" rows="*,*,*">
        <Label :text="title" for="title in titles"/>
    </GridLayout>
</template>

<script>
    export default {
        data() {
            return {
                titles: ['foo', 'bar', 'test']
            }
        }
    }
</script>

私が受け取るエラーは次のとおりです。[Vue warn]: Property or method "title" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

4

1 に答える 1