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 ,都无效
我想要这个日历组件显示出来,请问是什么问题?
建议看下你用的日历组件是否支持H5端。
uniapp里面,官方文档经常会提及兼容性问题,比如有些属性只在H5中可用,有些只在APP端可用,因此才会有条件编译的写法,如果组件无法运行,首先考虑查下组件的文档中,是否提及兼容性问题。