VUE组件编程:defineProps都是未定义?

in 前后端开发 with 0 comment

请不要在网上浪费时间,看了很多,清一色全是ESLint问题

错误

但是问题是我压根没用它啊,自动安装?

node

尝试导入VUE的defineProps方法但失败了
最后我盯着代码研究了好半天,把代码简短一下就行了?

FROM:

const tabs = defineProps({
    "apps": {
        "type": Array,
        "required": true
    }
})['apps'] as Array<TabWindow>;

TO:

const props = defineProps({
    "apps": {
        "type": Array,
    "required": true
    }
}),tabs = props['apps'] as Array<TabWindow>;

成功了?

Responses