You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Laravel+Vue3+Vite项目dev环境ant-design-vue reactive函数报错求助

Laravel+Vue3+Vite项目dev环境下ant-design-vue IconBase.js调用reactive报错:isObject is not a function

我正在开发一个基于Laravel、Vue 3和Vite的项目,目前遇到一个奇怪的问题:

  • 执行npm run build后项目运行完全正常,但执行npm run dev时,ant-design-vue包的IconBase.js文件中调用Vue的reactive函数会抛出异常。
  • 出错的代码行:
    var twoToneColorPalette = reactive({ primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: false });
    
  • 具体错误栈:
    reactivity.esm-bundler.js:927 Uncaught TypeError: isObject is not a function
        at createReactiveObject (reactivity.esm-bundler.js:927:8)
        at reactive (reactivity.esm-bundler.js:891:10)
        at IconBase.js:13:27
    

已经尝试了多种常规排查方法(比如清理node_modules和lock文件重新安装、检查Vue与ant-design-vue的版本兼容性、确认Vite配置项),但都没能解决问题,恳请各位开发者提供可行的解决方案。

内容的提问来源于stack exchange,提问作者essaber yahya

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 19:17:34