Tencent / wujie

极致的微前端框架
https://wujie-micro.github.io/doc/
Other
4.07k stars 584 forks source link

wujie-vue3 组件局部注册时类型错误 #393

Open gadzan opened 1 year ago

gadzan commented 1 year ago

描述bug wujie-vue3 组件局部注册时类型错误

如何复现

<template>
    <WujieVue width="100%" height="100%" :name="appId" :url="appPath"></WujieVue>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import WujieVue from "wujie-vue3";

export default defineComponent({
    components: {
        WujieVue
    },
    props: {
        app: {
            type: String,
            default: ''
        },
        appPath: {
            type: String,
            default: ''
        }
    },
}

错误截图 截图_2023-02-14_13-48-15

最小复现仓库或者地址

yiludege commented 1 year ago

改了vue2的忘了改vue3的了,可以先 ignore 一下

gadzan commented 1 year ago

临时方案是只能通过 @ts-nocheck 关闭整个文件的类型检测...

<script lang="ts">
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import { defineComponent, computed } from 'vue';
import WujieVue from "wujie-vue3";