你瞅啥呢

随笔分类 -  uniapp

摘要:完整报错:Error in onLoad hook: "TypeError: eval is not a function" onLoad钩子中的错误:“TypeError:eval不是函数” 原因:代码里使用了eval函数,小程序端不支持该函数,h5端和app(Android)端支持。 解决方案: 阅读全文
posted @ 2023-07-03 10:44 叶乘风 阅读(2283) 评论(0) 推荐(0) 编辑
摘要:2023-06-30 reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stackuniapp之运行到android端报错:reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check 阅读全文
posted @ 2023-06-30 15:20 叶乘风 阅读(15564) 评论(1) 推荐(0) 编辑
摘要:前言:业务需求,v-if显示内容,v-else不显示内容,在h5端显示正常,小程序端未测,app端v-else的时候显示了一个undefined。 猜测:理论上来说,v-else符合条件了就不会显示内容呀,可能是各个平台对vue或者uniapp的兼容性导致的。 原因:v-else代码里的一个变量确实 阅读全文
posted @ 2023-06-29 11:28 叶乘风 阅读(241) 评论(0) 推荐(0) 编辑
摘要:原因:不能显示的图片标签为uview-ui的u-image,它没有高度只有宽度,所以撑不起一张图片。 解决方案:给u-image添加高度。注意要按照这种格式写: <u-image width="60rpx" height="60rpx" /> 而下面这种行内样式是不生效的,具体为什么我也不知道~ < 阅读全文
posted @ 2023-06-27 17:17 叶乘风 阅读(1124) 评论(0) 推荐(0) 编辑
摘要:hbuilderx抛出一个错误,注释掉对应的一行代码就应该没事了,但是还是显示原来的错误,就好像没修改到一样;我是用hbuilderx来运行uni项目到h5端的,然后用vscode来修改代码; 我在hbuilderx打开对应的文件查看,结果在hbuilderx里面显示是没修改,真是奇了怪了,vsco 阅读全文
posted @ 2023-06-27 10:33 叶乘风 阅读(93) 评论(0) 推荐(0) 编辑
摘要:前言:小程序分包,设置好路径后发现打包后的app.josn文件(unpackage\dist\dev\mp-weixin)中的subPackages还是为空? 原因:subPackages写法有误,仔细对比了一下,发现subPackages应为数组而不是对象。 "subPackages": { "r 阅读全文
posted @ 2023-06-26 16:31 叶乘风 阅读(936) 评论(0) 推荐(0) 编辑
摘要:前言:uni项目中导入uview的vtabs插件来做分页,奈何导入demo后发现无法实现滑动页面来自动选中左侧菜单。 原因:大哥!请先看文档,文档里有写,设置chain为true即可左右联动!好吧,是我没留意。 解决方案:设置vtabs属性chain为true,官网示例代码: <template> 阅读全文
posted @ 2023-06-25 23:10 叶乘风 阅读(774) 评论(0) 推荐(0) 编辑
摘要:前言:项目中引用了uni-data-picker插件,其官方代码如下: <uni-data-picker placeholder="请选择地址" popup-title="请选择城市" c ollection="opendb-city-china" field="code as value, nam 阅读全文
posted @ 2023-06-20 15:26 叶乘风 阅读(1627) 评论(0) 推荐(0) 编辑
摘要:前言:uniapp项目报错:[system] TypeError: Cannot use 'in' operator to search for 'storeInfo' in undefined 原因:data里面没有写return,如下: <script> export default { dat 阅读全文
posted @ 2023-06-20 10:14 叶乘风 阅读(203) 评论(0) 推荐(0) 编辑
摘要:前言:想使用该Api来获取设备导航栏高度,结果报错了:API `getMenuButtonBoundingClientRect` is not yet implemented 尚未实现API `getMenuButtonBoundingClientRect` 原因:该Api不支持在app端或者h5端 阅读全文
posted @ 2023-06-19 14:22 叶乘风 阅读(186) 评论(0) 推荐(0) 编辑
摘要:详细报错: [HBuilder] 11:02:51.408 Manifest.json文件以下节点配置错误,请检查修复[HBuilder] 11:02:51.408 app-plus.distribute.icons.android.hdpi 文件不存在[HBuilder] 11:02:51.408 阅读全文
posted @ 2023-06-19 11:08 叶乘风 阅读(2121) 评论(0) 推荐(0) 编辑
摘要:2023-02-28 Unknown custom element: &lt;uni-view&gt; - did you register the component correctly? For recursive components, make sure to provide the &quot;name&quot; option.问题描述:vue h5业务,之前是由wepy转成uniapp,报错内容为: Unknown custom element: <uni-view> - did you register the component correctly? For recursive components, make su 阅读全文
posted @ 2023-02-28 16:11 叶乘风 阅读(1747) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示