1if (!window.__POWERED_BY_QIANKUN__) { 2 window.render && window.render() 3} 4 5window["wsxc_portal"] = { 6 /** 7 * bootstrap åªä¼å¨å¾®åºç¨åå§åçæ¶åè°ç¨ä¸æ¬¡ï¼ä¸æ¬¡å¾®åºç¨éæ°è¿å ¥æ¶ä¼ç´æ¥è°ç¨ mount é©åï¼ä¸ä¼åéå¤è§¦å bootstrapã 8 * é常æä»¬å¯ä»¥å¨è¿éåä¸äºå ¨å±åéçåå§åï¼æ¯å¦ä¸ä¼å¨ unmount é¶æ®µè¢«éæ¯çåºç¨çº§å«çç¼åçã 9 */ 10 bootstrap: function (){ 11 return Promise.resolve().then(function (){ 12 console.log('react app bootstraped'); 13 }) 14 }, 15 /** 16 * åºç¨æ¯æ¬¡è¿å ¥é½ä¼è°ç¨ mount æ¹æ³ï¼é常æä»¬å¨è¿é触ååºç¨çæ¸²ææ¹æ³ 17 */ 18 mount: function (props){ 19 console.log('------ props --> ', props); 20 return Promise.resolve().then(function (){ 21 var container = document.getElementById('root') 22 container = props.container 23 var innerContainer = document.createElement('div') 24 innerContainer.id = "container" 25 console.log('------ container --> ', container); 26 console.log('------ window --> ', window); 27 container.appendChild(innerContainer) 28 // root = props.container? ReactDOM.createRoot( props.container as HTMLElement) : root 29 window.render && window.render() 30 }) 31 }, 32 /** 33 * åºç¨æ¯æ¬¡ ååº/å¸è½½ ä¼è°ç¨çæ¹æ³ï¼é常å¨è¿éæä»¬ä¼å¸è½½å¾®åºç¨çåºç¨å®ä¾ 34 */ 35 unmount: function (){ 36 return Promise.resolve().then(function (){ 37 ReactDOM && ReactDOM.unmountComponentAtNode(document.getElementById('container')); 38 }) 39 }, 40 /** 41 * å¯éçå½å¨æé©åï¼ä» ä½¿ç¨ loadMicroApp æ¹å¼å 载微åºç¨æ¶çæ 42 */ 43 update: function (props){ 44 return Promise.resolve().then(function (){ 45 console.log('update props', props); 46 }) 47 } 48}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.