我想在全局添加一个组件,就使用了Vue.use的方法注册一个插件,在引入ts后,便报了这一句错误,求解怎么解决
index.ts
import infoList from './components/public/info.vue'
const Components = {
infoList,
}
const installer = {
install(Vue:any,opt:any)?{
Object.keys(Components).forEach((name:any) => {
Vue.component(name, Components[name]) // X
})
}
}
export default installer
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…