-
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
1.3.0-beta.3,代码编译成微信小程序代码的时候,dom元素递归调用的时候,dom无法完全显示 #3334
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
这个问题,看了官网的demo互相调用不同的函数,还是无法解决,麻烦大佬指导一下@yuche |
尝试了一下 template 的确不能相互引用,你可以把 renderDom/renderString 作为独立的组件相互引用试试看,这样应该能解决问题 |
CC @yuche |
也不行,编译直接报错了,编译失败,详情看原仓库@yuche |
那是因为你没写 return |
应该有return吧,只是做了判断,大佬能不能提个merge看看。😊😊😊@yuche |
我把ts 去掉,改成js ,并且加上了return ,编译报错,代码已更新. VM233:1 thirdScriptError
$taroCompReady is not defined; [Component] Property Observer Error @ pages/index/renderDom#observer
ReferenceError: $taroCompReady is not defined |
这个问题后来暂时解决了,虽然taro不支持递归,但是我这边已知的业务需求并不需要递归太多次,也就是层级的最大限度是够的,例如七层,那我写七个一模一样的递归函数,逐一调用,模拟出递归的效果。 |
期待未来的不久taro支持递归。 |
不支持调用组件自身,但是可以把 |
上面有源码啊,贴出来了,互相调用,不行 |
写成文件的方式 |
|
@Faithree ,没at我没看到。 你是不是看错了项目,你看看 这个网页与小程序端是同步的,网页修改了,小程序会同步修改的,小程序码在右上角图标那。 |
@Faithree |
@yuche @so-diao 上次看错项目了,这次看到了递归了,但我的上面的demo也用过类似的类调用类这种,但是我当时是不行的,初步判断我的数据结构比较复杂,或者是写的判断条件太多了导致的不行,我看看我那个能不能简化一下代码,再定位一下问题谢谢两位。 |
问题描述
1.3.0-beta.3,代码编译成微信小程序代码的时候,dom元素实现递归调用的时候,dom在开发者工具和手机上均无法完全显示
复现步骤
[复现问题的步骤]
[或者可以直接贴源代码,能贴文字就不要截图]
期望行为
页面展示文本
在端午活动页面提交表单
但是目前显示在提交表单
报错信息
![image](https://user-images.githubusercontent.com/21101396/58951313-61299b80-87c3-11e9-99fd-d3f7aca81a06.png)
![image](https://user-images.githubusercontent.com/21101396/58951350-79011f80-87c3-11e9-8ecf-a8ca9a3bdb49.png)
页面输出结果不符合预期
dom节点不符合预期
系统信息
补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]
附上github地址
https://github.com/Faithree/taro-bug
The text was updated successfully, but these errors were encountered: