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

猜你喜欢

转载自www.cnblogs.com/winyh/p/12061376.html
今日推荐