Kaynağa Gözat

fixed Layout('init') for external use

REJack 5 yıl önce
ebeveyn
işleme
2473021861

+ 3 - 3
build/js/Layout.js

@@ -166,7 +166,7 @@ const Layout = (($) => {
 
     // Static
 
-    static _jQueryInterface(config) {
+    static _jQueryInterface(config = '') {
       return this.each(function () {
         let data = $(this).data(DATA_KEY)
         const _options = $.extend({}, Default, $(this).data())
@@ -176,8 +176,8 @@ const Layout = (($) => {
           $(this).data(DATA_KEY, data)
         }
 
-        if (config === 'init') {
-          data[config]()
+        if (config === 'init' || config === '') {
+          data['_init']()
         }
       })
     }

+ 6 - 2
dist/js/adminlte.js

@@ -435,6 +435,10 @@
       ;
 
       Layout._jQueryInterface = function _jQueryInterface(config) {
+        if (config === void 0) {
+          config = '';
+        }
+
         return this.each(function () {
           var data = $(this).data(DATA_KEY);
 
@@ -445,8 +449,8 @@
             $(this).data(DATA_KEY, data);
           }
 
-          if (config === 'init') {
-            data[config]();
+          if (config === 'init' || config === '') {
+            data['_init']();
           }
         });
       };

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
dist/js/adminlte.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
dist/js/adminlte.min.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
dist/js/adminlte.min.js.map