Two methods LayUI pop overloaded parent data table

Reference LayUI official documents, overloaded parent data table to find the following two methods in the child window:

1, the sub-window reload: reload method call parent talbe directly in the child window.

        . $ ( "body") ON ( "the Click", "#test", function () {
             // refresh parent data table 
            parent.layui.table.reload ( "Demo" );
             // Close elastic layer 
            var index = parent.layer.getFrameIndex (the window.name); // first get the current index layer iframe 
            parent.layer.close (index); // before you do    
        });

2, the parent window Overload: End event callback is triggered by the pop Layer:

                        = perContent layer.open ({ 
                            type: 2 , 
                            title: 'adding lecturer' , 
                            shadeClose: to true , 
                            Shade: 0.8 , 
                            MaxMin: to true , 
                            Area: [ '80% ', '90%' ], 
                            Content: '@url. the Action ( "the Create", new new {Source = "index"}) ', // iframes the URL 
                            // callback by End 
                            End: function () {
                                table.reload ( 'Demo' ); 
                            } 
                        }); 
                        // The following code can play full-screen window directly 
                        layer.full (perContent);

 

Guess you like

Origin www.cnblogs.com/superfeeling/p/10929982.html