fixed Layout('init') for external use

pull/2447/head
REJack 5 years ago
parent 72d348d34d
commit 2473021861
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888

@ -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…
Cancel
Save