<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ## 3.2.彈窗相關方法 **open和popupRight方法:** ```javascript // 打開彈窗 admin.open({ type: 2, content: 'tpl-theme.html' }); // 打開右側面板 admin.popupRight({ type: 2, content: 'tpl-theme.html' }); ``` 這兩個方法只是對layer.open進行了一層封裝,參數和layer一樣,查看[layer文檔](https://www.layui.com/doc/modules/layer.html)。 新增參數url: ```javascript admin.open({ title: 'Hello', url: 'tpl-theme.html' }); admin.popupRight({ url: 'tpl-theme.html' }); ``` `type:2, content:xxx`這種是iframe類型的彈窗,使用`url`會通過ajax加載頁面到彈窗中,而不是iframe嵌入。 當使用url方式的時候,彈窗頁面應該是代碼片段,而不是完整的html,如下所示: ```html <style> * { color: red; } </style> <div class="layui-form model-form"> <button class="layui-btn" ew-event="closeDialog">關閉我</button> </div> <script> layui.use(['layer', 'form'], function () { var $ = layui.jquery; }); </script> ``` 頁面不需要html、body這些東西,并且可以直接用`<script>`標簽來寫事件。 **admin.iframeAuto()方法:** 針對type:2的彈窗自適應彈窗高度,寫在彈窗的子頁面中,此方法是調用一次做一次高度自適應, 如果你用js動態修改了彈窗子頁面的高度,需要再調用一次。 **admin.closeThisDialog():** 關閉當前iframe類型彈窗,針對type:2的彈窗,在彈窗的子頁面調用即可關閉當前的iframe彈窗。 **admin.closeDialog('#xxx'):** 關閉非iframe類型的彈窗,調用需要傳遞彈窗頁面里面任意一個的元素。 關閉彈窗還可以使用`ew-event`操作: ```html <!-- 關閉彈窗(智能) --> <button ew-event="closeDialog"></button> <!-- 關閉iframe類型的彈窗 --> <button ew-event="closeIframeDialog"></button> <!-- 關閉頁面層的彈窗 --> <button ew-event="closePageDialog"></button> ``` > admin模塊還封裝了彈窗參數傳遞等更多關于彈窗的使用,請到彈窗專題查看。 <br/>
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看