| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/framework7/node_modules/framework7/components/messagebar/ |
Upload File : |
import $ from '../../shared/dom7.js';
import { extend } from '../../shared/utils.js';
import Messagebar from './messagebar-class.js';
import ConstructorMethods from '../../shared/constructor-methods.js';
export default {
name: 'messagebar',
static: {
Messagebar
},
create() {
const app = this;
app.messagebar = ConstructorMethods({
defaultSelector: '.messagebar',
constructor: Messagebar,
app,
domProp: 'f7Messagebar',
addMethods: 'clear getValue setValue setPlaceholder resizePage focus blur attachmentsCreate attachmentsShow attachmentsHide attachmentsToggle renderAttachments sheetCreate sheetShow sheetHide sheetToggle'.split(' ')
});
},
on: {
tabBeforeRemove(tabEl) {
const app = this;
$(tabEl).find('.messagebar-init').each(messagebarEl => {
app.messagebar.destroy(messagebarEl);
});
},
tabMounted(tabEl) {
const app = this;
$(tabEl).find('.messagebar-init').each(messagebarEl => {
app.messagebar.create(extend({
el: messagebarEl
}, $(messagebarEl).dataset()));
});
},
pageBeforeRemove(page) {
const app = this;
page.$el.find('.messagebar-init').each(messagebarEl => {
app.messagebar.destroy(messagebarEl);
});
},
pageInit(page) {
const app = this;
page.$el.find('.messagebar-init').each(messagebarEl => {
app.messagebar.create(extend({
el: messagebarEl
}, $(messagebarEl).dataset()));
});
}
},
vnode: {
'messagebar-init': {
insert(vnode) {
const app = this;
const messagebarEl = vnode.elm;
app.messagebar.create(extend({
el: messagebarEl
}, $(messagebarEl).dataset()));
},
destroy(vnode) {
const app = this;
const messagebarEl = vnode.elm;
app.messagebar.destroy(messagebarEl);
}
}
}
};