mirror of https://github.com/ColorlibHQ/AdminLTE
fixed Layout('init') for external use
parent
72d348d34d
commit
2473021861
|
@ -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']()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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']();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue