v4.5.6 組件間傳參 Msg.js文件報(bào)錯(cuò)
??
?warning? in ./src/components/msg.js
"export 'default' (imported as 'Vue') was not found in 'vue'
??
?warning? in ./src/components/msg.js
"export 'default' (imported as 'Vue') was not found in 'vue'
2020-09-11
舉報(bào)
2021-06-05
把msg.js里的內(nèi)容改了,新版不支持了,改成下邊的可以解決,找了一天找到的方法
--------
import?mitt?from?'mitt'
const?bus?=?{}
const?emitter?=?mitt()
bus.$on?=?emitter.on
bus.$off?=?emitter.off
bus.$emit?=?emitter.emit
export?default?bus
2020-10-11
我也是,我用的是下面跟老師一樣的代碼,但這適用于vue-cli 3x,v4.5.6的不知道該怎樣弄
import?Vue?from?'vue'
export?default new Vue
2020-09-29
我也是這樣 求大神解答
2020-09-17
代碼貼出來(lái)