-
Notifications
You must be signed in to change notification settings - Fork 55
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
define变量的引用问题 #23
Comments
这里不需要使用逐层查找,因为同名 define 的变量只记录最后一个。 |
我和这个情况一样,library.vm是全局的,然后 |
如1楼所说的,查找时候带上 this.template.__parent.__define。看代码和1楼居然是同一公司的。。。 |
@fool2fish index 引用了lib,然后调用lib里的macro,macro用到一个变量,在java里是如果lib没有这个变量,就会到index里去找 - 但是js这边不是,我贴的代码就是为了和java一样 |
@gogoyqj 了解了,近期修复掉,或者你发个 mr ? |
below is library.vm:
below is index.vm:
在java里,render index.vm能输出$q_js,$q_css,$q_body,这样也是比较合理的
在engine-ref.js里
是不是做成 return this.template._define[xxx] <- this.template.__parent.__define这样逐层查找比较合理,且和java更加吻合
The text was updated successfully, but these errors were encountered: