liu19841108@163.com
liu19841108@163.com
  • 发布:2019-05-02 23:39
  • 更新:2020-11-22 17:05
  • 阅读:8918

咨询下uni-app是否可以使用vue的第三方ui组件例如Mint UI

分类:uni-app
npm

如题,想咨询下,HbuilderX创建的uni-app项目,能否像原生的vue项目一样安装使用npm装第三方的ui组件,例如Mint UI,
我npm安装后如下使用一直在报错
import MintUI from 'mint-ui'
Vue.use(MintUI)

错误信息:
VM3547:1 thirdScriptError
sdk uncaught third Error
Cannot read property 'documentMode' of undefined
TypeError: Cannot read property 'documentMode' of undefined
at Object.<anonymous> (http://127.0.0.1:22456/appservice/common/vendor.js:20507:49)
at webpack_require__ (http://127.0.0.1:22456/appservice/common/vendor.js:20322:31)
at Object.push.../../../HBuilderProjects/testproject/node_modules/mint-ui/lib/mint-ui.common.js.module.exports.Object.defineProperty.value (http://127.0.0.1:22456/appservice/common/vendor.js:21596:81)
at
webpack_require (http://127.0.0.1:22456/appservice/common/vendor.js:20322:31)
at Object.<anonymous> (http://127.0.0.1:22456/appservice/common/vendor.js:28162:3)
at
webpack_require (http://127.0.0.1:22456/appservice/common/vendor.js:20322:31)
at Object.<anonymous> (http://127.0.0.1:22456/appservice/common/vendor.js:26558:79)
at
webpack_require (http://127.0.0.1:22456/appservice/common/vendor.js:20322:31)
at Object.push.../../../HBuilderProjects/testproject/node_modules/mint-ui/lib/mint-ui.common.js.module.exports.Object.defineProperty.value (http://127.0.0.1:22456/appservice/common/vendor.js:21167:80)
at __webpack_require
(http://127.0.0.1:22456/appservice/common/vendor.js:20322:31)

是我使用不当还是本身就不支持,谢谢大佬们的支持

2019-05-02 23:39 负责人:无 分享
已邀请:

最佳回复

DCloud_heavensoft

DCloud_heavensoft

189904001@qq.com

189904001@qq.com

你这应该是小程序里报出来的吧? 我试过几次用uniapp开发的小程序不太兼容mint-ui

动力雀巢

动力雀巢

我也遇到了,在H5下是支持的,但是小程序和安卓端都不支持,都报错,

sealSky

sealSky

Vue.use(第三方库的时候)会报编译错误

liuzhuolin

liuzhuolin

请问最后怎么解决的?还能用吗

1306769296@qq.com

1306769296@qq.com - 510587

请问大佬,最后可以引入mintUI了吗?

姜盼

姜盼

请问大佬解决了吗?我引入的是element-ui,也是同样的错误

  • 2993277254@qq.com

    element只有h5支持

    2020-11-22 17:10

  • 姜盼

    回复 2993277254@qq.com: 为什么我把element-ui卸载之后又会报这个错误呢?reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->Uncaught ReferenceError: Element is not defined

    2020-11-22 19:45

要回复问题请先登录注册