fixed Layout('init') for external use
This commit is contained in:
@@ -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']()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
8
dist/js/adminlte.js
vendored
8
dist/js/adminlte.js
vendored
@@ -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']();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
2
dist/js/adminlte.js.map
vendored
2
dist/js/adminlte.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/js/adminlte.min.js
vendored
2
dist/js/adminlte.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/adminlte.min.js.map
vendored
2
dist/js/adminlte.min.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user