Vue 组件封装发布到npm 报错 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

原因是 没有导出 export default { name:"Test" }  

index.js 文件

import Test from './src/main.vue'

Test.install = function (Vue) {
Vue.component(Test.name, Test
}

export default Test
posted @ 2019-12-18 18:28  winyh  阅读(6330)  评论(0编辑  收藏  举报