恋小诺 2022-03-01 14:48 采纳率: 0%
浏览 256

H5项目经过uniapp用模拟器打开

H5项目经过uniapp用模拟器打开,可以登录进去后我的课表的组件是用daypilot-pro-vue写的日历,但是空白,报的是这个错:

TypeError: Cannot read property 'matchMedia' of undefined

但是我的文档里没有这个属性matchMedia,
返回上一页后再重新点进去就报这个错:

14:40:44.003 [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
14:40:44.045 (found <Root>) 
14:40:44.087 cid unmatched [object Object] at view.umd.min.js:1
14:40:44.107 TypeError: Invalid attempt to destructure non-iterable instance.
14:40:44.129 In order to be iterable, non-array objects must have a [Symbol.iterator]() method. at view.umd.min.js:1
14:40:44.150 cid unmatched [object Object] at view.umd.min.js:1
14:40:44.172 TypeError: Invalid attempt to destructure non-iterable instance.
14:40:44.193 In order to be iterable, non-array objects must have a [Symbol.iterator]() method. at view.umd.min.js:1

我照着有些报错使用了百度里的方法,但是都无效
例如:[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
在vue.config.js 加别名属性或者加一个 runtimeCompiler: true ,都无效
我想要这个日历组件显示出来,请问是什么问题?

  • 写回答

1条回答 默认 最新

  • 波 吉 2022-03-02 15:19
    关注

    建议看下你用的日历组件是否支持H5端。
    uniapp里面,官方文档经常会提及兼容性问题,比如有些属性只在H5中可用,有些只在APP端可用,因此才会有条件编译的写法,如果组件无法运行,首先考虑查下组件的文档中,是否提及兼容性问题。

    评论

报告相同问题?

问题事件

  • 创建了问题 3月1日

悬赏问题

  • ¥15 Windows 驱动 pcie问题
  • ¥15 用C语言完成一个复杂的游戏
  • ¥15 如何批量更改很多个文件夹里的文件名中包含文件夹名?
  • ¥50 MTK手机模拟HID鼠标出现卡顿
  • ¥20 求下下面这个数据结构代码
  • ¥20 前端 二进制文件流图片转化异常
  • ¥15 github上的这个C语言项目如何跑起来
  • ¥15 java 判断某个数 区间是否存在
  • ¥15 appium控制多个雷电模拟器问题
  • ¥15 C# iMobileDevice