小程序中使用MpVue框架+VantUI,编译正常但是小程序开发工具中展示时报错

解决办法:小程序开发工具中ES6转Ess

app created and cache logs by setStorageSync
VM2607:1 thirdScriptError
 sdk uncaught third Error
 module "static/vant/checkbox/index.js" is not defined
 Error: module "static/vant/checkbox/index.js" is not defined
    at require (http://127.0.0.1:57228/appservice/__dev__/WAService.js:23:13423)
    at <anonymous>:19:7
    at HTMLScriptElement.scriptLoaded (http://127.0.0.1:57228/appservice/appservice?t=1539393805781:6239:23)
console.error @ VM2607:1
(anonymous) @ WAService.js:15
(anonymous) @ WAService.js:6
e @ appservice?t=1539393805781:5622
window.onerror @ VM2607:1
scriptLoaded @ appservice?t=1539393805781:6239
VM2607:1 jsEnginScriptError
Component is not found in path "static/iview/button/index" (using by "pages/index/main")
Error: Component is not found in path "static/iview/button/index" (using by "pages/index/main")
    at e (http://127.0.0.1:57228/appservice/__dev__/WAService.js:17:21420)
    at e (http://127.0.0.1:57228/appservice/__dev__/WAService.js:17:21606)
    at le (http://127.0.0.1:57228/appservice/__dev__/WAService.js:18:20)
    at Object.i.addView (http://127.0.0.1:57228/appservice/__dev__/WAService.js:18:1388)
    at Function.value (http://127.0.0.1:57228/appservice/__dev__/WAService.js:20:311)
    at Xt (http://127.0.0.1:57228/appservice/__dev__/WAService.js:20:14678)
    at sn (http://127.0.0.1:57228/appservice/__dev__/WAService.js:20:17267)
    at un (http://127.0.0.1:57228/appservice/__dev__/WAService.js:20:17605)
    at Function.<anonymous> (http://127.0.0.1:57228/appservice/__dev__/WAService.js:20:20038)
    at L.<anonymous> (http://127.0.0.1:57228/appservice/__dev__/WAService.js:19:18211)

Logo

前往低代码交流专区

更多推荐