我试图disable Vuetify V-Stepper Actions像如果它是在第一步previous按钮将被禁用和next按钮将被禁用时,它到达最后一步.顺便说一句,我正在使用Vuetify 3和Nuxt 3,这里是我的代码
<template>
<section class="p-10">
<v-stepper
:items="headerItems"
rounded="0"
theme="light"
ref="stepper"
elevation="0"
selected-class="selected-item"
>
<template v-slot:item.1>
<p>Page 1</p>
</template>
<template v-slot:item.2>
<p>Page 2</p>
</template>
<template v-slot:item.3>
<p>Page 3</p>
</template>
<template v-slot:item.4>
<p>Page 4</p>
</template>
<template v-slot:actions>
<section class="flex justify-end items-center space-x-4 pt-10">
<v-btn @click="stepper.prev()" size="large" variant="outlined">
<p class="text-[18px] font-medium capitalize tracking-wide">Previous</p>
</v-btn>
<v-btn @click="stepper.next()" size="large" variant="flat" color="primary" theme="dark">
<p class="text-[18px] font-medium capitalize tracking-wide">Next</p>
</v-btn>
</section>
</template>
</v-stepper>
</section>
</template>
<script setup>
const stepper = ref(null);
const headerItems = ref(["Step 1", "Step 2", "Step 3", "Step 4"]);
</script>
<style scoped>
/* Custom styles here */
</style>
我试着做:disabled="stepper.activeStep === 0"
在v-btn
,但它不工作的前一个和下一个按钮.