久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      react怎么動態(tài)增加節(jié)點

      react動態(tài)增加節(jié)點的方法:1、通過“KmcDialog.showInstance = function(properties) {…}”方法顯示彈框;2、使用“KmcDialog.showInstance({isShow: true});KmcDialog.removeInstance();”方式在需要使用的地方直接調(diào)用即可。

      react怎么動態(tài)增加節(jié)點

      本教程操作環(huán)境:Windows10系統(tǒng)、react18.0.0版、Dell G3電腦。

      react怎么動態(tài)增加節(jié)點?

      React-動態(tài)插入節(jié)點組件

      引入組件后,可以通過調(diào)用方式來插入顯示組件

      /**********組件KmcDialog************/ /**  * 顯示彈框  */ KmcDialog.showInstance = function(properties) {     if (!document.getElementById("KmcDialog")) {         let props = properties || {};         let div = document.createElement('div');         div.setAttribute('id', 'KmcDialog');         document.body.appendChild(div);         ReactDOM.render(React.createElement(KmcDialog, props), div);     } } /**  * 刪除彈框  */ KmcDialog.removeInstance = function() {     if(document.getElementById("KmcDialog")) {         document.getElementById('KmcDialog').remove();     } }
      登錄后復(fù)制

      在需要使用的地方直接調(diào)用:

      KmcDialog.showInstance({     isShow: true }); KmcDialog.removeInstance();
      登錄后復(fù)制

      推薦學(xué)習(xí):《react視頻教程》

      贊(1)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號