VM59:1 [Vue warn]: Injection "popup" not found
found in
---> components/uni-popup/uni-popup-dialog
node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup
pages/index/index
console.error @ VM59:1
warn @ mp.runtime.esm.js:613
resolveInject @ mp.runtime.esm.js:2486
initInjections @ mp.runtime.esm.js:2436
Vue._init @ mp.runtime.esm.js:4974
VueComponent @ mp.runtime.esm.js:5123
attached @ index.js:1365
r.safeCallback @ VM75 WAService.js:1
r.call @ VM75 WAService.js:1
r @ VM75 WAService.js:1
r @ VM75 WAService.js:1
r @ VM75 WAService.js:1
r @ VM75 WAService.js:1
m @ VM75 WAService.js:1
y.pretendAttached @ VM75 WAService.js:1
Fe @ VM75 WAService.js:1
Tt @ VM75 WAService.js:1
(anonymous) @ VM75 WAService.js:1
At @ VM75 WAService.js:1
(anonymous) @ VM75 WAService.js:1
(anonymous) @ VM75 WAService.js:1
i.emit @ VM75 WAService.js:1
emit @ VM75 WAService.js:1
(anonymous) @ VM75 WAService.js:1
(anonymous) @ VM75 WAService.js:1
n @ VM73 asdebug.js:1
(anonymous) @ VM73 asdebug.js:1
(anonymous) @ VM73 asdebug.js:1
_ws.onmessage @ VM73 asdebug.js:1
VM59:1 TypeError: Cannot set property 'mkclick' of undefined
at VueComponent.created (uni-popup-dialog.vue:113)
at invokeWithErrorHandling (mp.runtime.esm.js:1868)
at callHook (mp.runtime.esm.js:4165)
at VueComponent.Vue._init (mp.runtime.esm.js:4977)
at new VueComponent (mp.runtime.esm.js:5123)
at ve.attached (index.js:1365)
at r.safeCallback (VM75 WAService.js:1)
at r.call (VM75 WAService.js:1)
at r (VM75 WAService.js:1)
at r (VM75 WAService.js:1)
这是个在引用弹出框 微信开发工具平台的报错,我新建了空项目进行了测试,如果用npm方式安装ui库 引用popup-dialog时会报错, 用内置uni-ui项目创建的项目 引用就不会报错。引用代码如下:
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog mode="input" title="输入内容" placeholder="请输入新内容"
:before-close="true" @close="closePopup" @confirm="confirm"></uni-popup-dialog>
</uni-popup>