我按照平时的方法创建自定义组件,老是报路径错误,不知怎么回事?

小程序 文章 2020-08-06 15:21 753 0 全屏看文

AI助手支持GPT4.0

我按照平时的方法创建自定义组件,老是报路径错误,不知怎么回事?I follow the usual method to create custom components, and always report the path error. I don't know what's wrong?

我按照平时的方法创建自定义组件,老是报路径错误,不知怎么回事?

今天我按照平时的方法创建自定义组件,老是报路径错误,于是我另起一个项目,还是这样,真是奇了怪了,看以前的视频教程,步骤没错啊,老师的就可以我就不行。不知道为什么?(相对路径绝对路径都试过了)

我创建自定义组件的方法:

第一步:创建名为components文件夹

第二步:在components文件夹中创建test_comp文件夹

第三步:在test_comp右击鼠标创建test_comp组件

第四步:在index.json中引用组件 "test_comp":"/components/test_comp/test_comp"

第五步:在index.wxml使用

第六步:保存运行,结果报错。其实不用第五步运行也会报错

Today, I created a custom component according to the usual method, and always reported path errors. So I started another project, and it's really strange. After watching the previous video tutorial, the steps are correct, but the teacher's is OK. I can't. Do not know why? (relative path and absolute path have been tried) I create custom components: Step 1: create a folder named components. Step 2: create a test in the components folder_ Comp folder step 3: in test_ Comp right click to create test_ Comp component step 4: in the index.json Reference component "test" in_ comp":"/components/test_ comp/test_ Comp "step 5: in the index.wxml Use the sixth step: save the run, the result reported an error. In fact, if you don't need to run step 5, you will report an error

回答:

o0o有脾气的酸奶:

没发现问题

https://developers.weixin.qq.com/s/pML1uomM7Bj2

民益电器:

我用的是稳定版的,换成开发版后这个错误就不报了

Why not?:

自定义组件我都是用相对路径的

民益电器:我也习惯于用相对路径,两种都试过了,不行

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
请问苹果手机小程序为什么不能添加到桌面?
小程序包超出大小限制?
能不能在用户点击小程序图标时,就监控到用户这个使用的行为?
小程序任何内容都不能发布了,提示“内容未通过微信安全校验”,这是为什么呀?
弄了一个豆瓣电影,但是详情页面无内容?
随便看看
微信公众号免300认证教程 5174
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4483
小程序广告组件通过审核,但是小程序内没有显示广告? 4454
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8507
问题? 8130
如何快速搭建抽奖助手小程序(无需代码知识) 5287
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6561
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5848
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5509
如何解决渲染层网络错误Failed to load media? 16757