Skip to content

script Setup 可以不用手动导入defineProps、defineEmits、defineExpose、withDefaults,但会报not defined错误

解决办法:

(1)、eslint-plugin-vue升级到8以上

(2)、eslintrc.js配置

js
env: {
    node: true,
    'vue/setup-compiler-macros': true // 新增的配置
  },

如有转载或 CV 的请标注本站原文地址