`

applyTo ,render, contentel,el,applytomarkup 的区别

阅读更多
 applyTo:  The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container.

id、dom node、或者一个存在的适当的Element 指向 一个已经存在在当前Document,一个已经为这个组件指定了架构的Div。
 当使用applyTo时,组件的要素也可以通过id或主元素中的css class name指定。如果可能的话正在创建的组件会试图通过markup创建它的子组件。
使用这个配置就不必调用render()了。如果applyTo指定了,任何传给render的值将会被忽略。并且目标元素的父元素将会自动成为组件的容器。

renderTo: The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.  

指定一个元素、节点来作为容器将组件呈现其内。

contentEl 指定一个html node 作为 此元素的body content。

el 组件所对应的dom元素

applytomarkup: 不明白markup 是什么东西

Apply this component to existing markup that is valid. With this function, no call to render() is required.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics