全部引入方式?jīng)]問題,但是按需引入的時候,報錯
vue.runtime.esm.js?2b0e:5120 Uncaught TypeError: Cannot read properties of undefined (reading 'install')
? ? at Function.Vue.use (vue.runtime.esm.js?2b0e:5120:1)
? ? at eval (main.js?c31f:10:1)
? ? at Module../examples/main.js (index.js:997:1)
? ? at __webpack_require__ (index.js:849:30)
? ? at fn (index.js:151:20)
? ? at Object.1 (index.js:1067:18)
? ? at __webpack_require__ (index.js:849:30)
? ? at checkDeferredModules (index.js:46:23)
? ? at index.js:925:18
? ? at index.js:928:10
2023-11-22
import?crmDetail?from?'crmdemo-ui'
Vue.use(crmDetail)
這樣按需引入,因為給組件加install的時候是默認(rèn)導(dǎo)出。
2023-03-24
在ui項目中的llib/index.js中加上
之后就能按需引入了
2022-02-22
這樣按需引入試一下
import Demo from 'mooc-ui/dist/demo.umd'
import Card from 'mooc-ui/dist/card.umd'
Vue.use(Demo)
Vue.use(Card)