跳至主要內容

01.setup关于props的报错

pinia小于 1 分钟

Bug

ESLint: Getting a value from the `props` in root scope of `<script setup>` will cause the value to lose reactivity.(vue/no-setup-props-destructure)

解决方案

  • 在你缩写 defineProps 的代码上加注释
/* eslint-disable */
// eslint-disable-next-line vue/no-setup-props-destructure
上次编辑于:
贡献者: 林深不见鹿