<template>
<v-layout column justify-center align-center>
<v-flex xs12 sm8 md6>
<v-card>
<v-card-title class="headline">TITLE</v-card-title>
<v-card-actions>
<v-spacer />
<v-btn color="primary" flat nuxt to="/inspire">Continue</v-btn>
</v-card-actions>
<v-card-actions>
<v-spacer />
<v-btn flat nuxt to="/test">Go To Test</v-btn>
</v-card-actions>
<v-text-field>
<v-textarea v-model="text" />
</v-text-field>
<v-card-actions>
<v-btn @click="gogo">test</v-btn>
</v-card-actions>
</v-card>
</v-flex>
</v-layout>
</template>
<script>
export default {
data: () => ({
text: 'why does not work?'
}),
methods: {
gogo() {
this.text = 'Yes! it works!'
}
}
}
</script>
当我单击测试btn时,它不起作用。文本值也不会显示。 我该如何解决?
我使用create-nuxt-app构建nuxt项目。 我的节点版本是v10.15.0