File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2206,7 +2206,7 @@ class Base extends CoreBase {
22062206 parentId : autoMount ? me . getMountedParentId ( ) : undefined ,
22072207 parentIndex : autoMount ? me . getMountedParentIndex ( ) : undefined ,
22082208 windowId : me . windowId ,
2209- ...me . vdom
2209+ ...ComponentManager . getVdomRenderTree ( me . vdom )
22102210 } ) ;
22112211
22122212 me . onRender ( data , useVdomWorker ? autoMount : false ) ;
Original file line number Diff line number Diff line change @@ -318,6 +318,29 @@ class Component extends Base {
318318 return parents
319319 }
320320
321+ /**
322+ * Copies a given vdom tree and replaces child component references with the vdom of their matching components
323+ * @param {Object } vdom
324+ * @returns {Object }
325+ */
326+ getVdomRenderTree ( vdom ) {
327+ let output = Neo . clone ( vdom ) ;
328+
329+ if ( vdom . cn ) {
330+ output . cn = [ ] ;
331+
332+ vdom . cn . forEach ( item => {
333+ if ( item . componentId ) {
334+ item = this . get ( item . componentId ) . vdom
335+ }
336+
337+ output . cn . push ( this . getVdomRenderTree ( item ) )
338+ } )
339+ }
340+
341+ return output
342+ }
343+
321344 /**
322345 * Check if the component had a property of any value somewhere in the Prototype chain
323346 *
You can’t perform that action at this time.
0 commit comments