Intact实例特殊属性

children

children属性用于获取所有传递给组件的子元素。如:

  1. var Component = Intact.extend({
  2. template: '<div>{self.get("children")}</div>'
  3. });
  4. var App = Intact.extend({
  5. template: 'var Component = self.Component; ' +
  6. '<Component><b>test</b></Component>',
  7. _init: function() {
  8. this.Component = Component;
  9. }
  10. });
  11. App;