<tfoot id='LeLya'></tfoot>
        <i id='LeLya'><tr id='LeLya'><dt id='LeLya'><q id='LeLya'><span id='LeLya'><b id='LeLya'><form id='LeLya'><ins id='LeLya'></ins><ul id='LeLya'></ul><sub id='LeLya'></sub></form><legend id='LeLya'></legend><bdo id='LeLya'><pre id='LeLya'><center id='LeLya'></center></pre></bdo></b><th id='LeLya'></th></span></q></dt></tr></i><div id='LeLya'><tfoot id='LeLya'></tfoot><dl id='LeLya'><fieldset id='LeLya'></fieldset></dl></div>
        <legend id='LeLya'><style id='LeLya'><dir id='LeLya'><q id='LeLya'></q></dir></style></legend>

        <small id='LeLya'></small><noframes id='LeLya'>

        • <bdo id='LeLya'></bdo><ul id='LeLya'></ul>

      1. 使用淘汰赛js弹出

        Popup using knockout js(使用淘汰赛js弹出)
        <legend id='PkVa3'><style id='PkVa3'><dir id='PkVa3'><q id='PkVa3'></q></dir></style></legend>
        <i id='PkVa3'><tr id='PkVa3'><dt id='PkVa3'><q id='PkVa3'><span id='PkVa3'><b id='PkVa3'><form id='PkVa3'><ins id='PkVa3'></ins><ul id='PkVa3'></ul><sub id='PkVa3'></sub></form><legend id='PkVa3'></legend><bdo id='PkVa3'><pre id='PkVa3'><center id='PkVa3'></center></pre></bdo></b><th id='PkVa3'></th></span></q></dt></tr></i><div id='PkVa3'><tfoot id='PkVa3'></tfoot><dl id='PkVa3'><fieldset id='PkVa3'></fieldset></dl></div>

            <tbody id='PkVa3'></tbody>
          • <bdo id='PkVa3'></bdo><ul id='PkVa3'></ul>

                <small id='PkVa3'></small><noframes id='PkVa3'>

                • <tfoot id='PkVa3'></tfoot>
                • 本文介绍了使用淘汰赛js弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在将我的一个旧 jquery 插件从 DOM 丛林迁移到这个花哨的 mvvm 框架淘汰赛.

                  i'm migrating one of my older jquery plugins from DOM jungle to this fancy mvvm framework knockout.

                  我将使用哪种技术来正确显示弹出容器?我必须通过调用"填充它,因为我每次都会得到一个 json 提要.

                  Which technique would i use to properly display a popup container? I ahve to populate it 'by call' since i get a json feed every time.

                  我尝试了一种使用 with 绑定的方法,但它仍然尝试在第一次运行时填充部分.

                  I tried an approach using the with binding, but it still attempts to populate the partial at its first runtime.

                  <!-- ko with: daySubmitFormViewModel -->
                      <div class="ec-consulation-lightbox">
                          <form id="cForm" class="form-container">
                             // Some bindings here.
                          </form>
                      </div>
                  <!-- /ko with: -->
                  

                  推荐答案

                  也可以不用自定义绑定.示例如下

                  It can be done without custom binding as well. Example is below

                              <div class="modalWindowBackground" data-bind="visible: popupDialog" >
                                  <div class="modalWindow" data-bind="with:popupDialog">
                                      <div class="content">
                                          <h2 data-bind="text: title"></h2>
                                          <p>
                                              <span data-bind="text: message"></span>
                                          </p>
                                          <div class="buttonSpace">
                                              <input type="button" class="closeButton" data-bind="value: closeButtonText, click: $root.hidePopupDialog" />
                                          </div>                            
                                      </div>
                                  </div>
                              </div>
                  

                  视图模型代码:

                      self.showAlert = function (title, message, closeButtonText) {
                          self.popupDialog({ title: title, message: message, closeButtonText: closeButtonText });
                      };
                      self.hidePopupDialog = function () {
                          self.popupDialog(null);           
                      };
                  
                    //Code which opens a popup
                    self.remove = function () {
                          .... some code ...
                          if (someCondition) {
                            self.showAlert('SomeTitle', 'Message', 'OK');
                            return;
                          }
                          .... some code ...
                     };
                  

                  这篇关于使用淘汰赛js弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                  Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                  Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                  How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                  Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                  Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))
                    <tbody id='dBqoN'></tbody>

                  <small id='dBqoN'></small><noframes id='dBqoN'>

                      <bdo id='dBqoN'></bdo><ul id='dBqoN'></ul>

                          <i id='dBqoN'><tr id='dBqoN'><dt id='dBqoN'><q id='dBqoN'><span id='dBqoN'><b id='dBqoN'><form id='dBqoN'><ins id='dBqoN'></ins><ul id='dBqoN'></ul><sub id='dBqoN'></sub></form><legend id='dBqoN'></legend><bdo id='dBqoN'><pre id='dBqoN'><center id='dBqoN'></center></pre></bdo></b><th id='dBqoN'></th></span></q></dt></tr></i><div id='dBqoN'><tfoot id='dBqoN'></tfoot><dl id='dBqoN'><fieldset id='dBqoN'></fieldset></dl></div>
                          <tfoot id='dBqoN'></tfoot>
                          <legend id='dBqoN'><style id='dBqoN'><dir id='dBqoN'><q id='dBqoN'></q></dir></style></legend>