-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
taro convert 出现的error: slot 的值必须是一个字符串 #2291
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
如报错所言,Taro 转小程序是没有办法使用动态的 slot 名的,你只能更改你的实现逻辑了 |
Hello~ 您的问题楼上已经提供了解决方案,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。 如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。 Good luck and happy coding~ |
@yuche 后期版本会支持吗?还是编译上无法实现? |
编译上无法实现,编译到 jsx 一定要有名字,而且这个名字一定不能是动态生成的。 |
@yuche 明白,谢谢啦 |
问题描述
我需要for循环来在组件中的slot添加内容。
复现步骤
错误 页面转换 pages/index/index.js
Error: slot 的值必须是一个字符串
期望行为
不报错
报错信息
tanzhifengdeMacBook-Pro:test tanzhifeng$ taro convert
👽 Taro v1.2.15
开始代码转换...
转换 入口文件 app.js
转换 入口配置 app.json
转换 入口样式 app.wxss
生成 入口文件 taroConvert/src/app.js
转换 页面文件 pages/index/index.js
转换 页面配置 pages/index/index.json
转换 页面模板 pages/index/index.wxml
转换 页面样式 pages/index/index.wxss
错误 页面转换 pages/index/index.js
Error: slot 的值必须是一个字符串
The text was updated successfully, but these errors were encountered: