We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
控件在使用initChildren初始化子控件时,应该使用一个特殊的valueReplacer以便于将自己的属性分发到子控件中去,类似ef提供的Model和控件的关系
initChildren
valueReplacer
ef
Model
假设一个控件内部写了这样的模板:
<!-- for: ${list} as ${item}, ${index} --> <esui-custom-item data-ui-datasource="@list.${index}"></esui-custom-item> <!-- /for -->
则应该会使得这个子控件的datasource属性指向父控件的list属性中的某一项
datasource
list
考虑到原来的initChildren的向后兼容性,为了实现这一功能,会增加一个initConnectedChildren方法,区别在于:
initConnectedChildren
Panel
intiConnectedChildren
The text was updated successfully, but these errors were encountered:
添加initConnectedChildren方法
ffe6790
Fix #585
No branches or pull requests
控件在使用
initChildren
初始化子控件时,应该使用一个特殊的valueReplacer
以便于将自己的属性分发到子控件中去,类似ef
提供的Model
和控件的关系假设一个控件内部写了这样的模板:
则应该会使得这个子控件的
datasource
属性指向父控件的list
属性中的某一项考虑到原来的
initChildren
的向后兼容性,为了实现这一功能,会增加一个initConnectedChildren
方法,区别在于:initChildren
用于类似Panel
的容器,其生成的子控件本身不由父控件控制,数据源使用的是再上层的intiConnectedChildren
用于有自己指定的子控件结构的控件,子控件完全由父控件管理,将父控件作为数据源The text was updated successfully, but these errors were encountered: