本文整理匯總了TypeScript中app/core/core.appEvents.emit方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript appEvents.emit方法的具體用法?TypeScript appEvents.emit怎麽用?TypeScript appEvents.emit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app/core/core.appEvents
的用法示例。
在下文中一共展示了appEvents.emit方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
scope.clipboard.on('success', () => {
appEvents.emit('alert-success', ['Content copied to clipboard']);
});
示例2: showSearch
showSearch() {
appEvents.emit('show-dash-search');
}
示例3: onMouseLeave
function onMouseLeave() {
appEvents.emit('graph-hover-clear');
clearCrosshair();
}
示例4:
this.backendSrv.deleteDashboard(this.dashboard.meta.slug).then(() => {
appEvents.emit('alert-success', ['Dashboard Deleted', this.dashboard.title + ' has been deleted']);
this.$location.url('/');
});
示例5: onMouseLeave
onMouseLeave() {
appEvents.emit('graph-hover-clear');
this.clearCrosshair();
}
示例6: emitGraphHoverEvent
emitGraphHoverEvent(pos) {
// Set minimum offset to prevent showing legend from another panel
pos.panelRelY = Math.max(pos.offset.y / this.height, 0.001);
// broadcast to other graph panels that we are hovering
appEvents.emit('graph-hover', { pos: pos, panel: this.panel });
}
示例7: function
elem.bind('plotclick', function(event, pos, item) {
appEvents.emit('graph-click', { pos: pos, panel: panel, item: item });
});
示例8: showHelpModal
showHelpModal() {
appEvents.emit('show-modal', {templateHtml: '<help-modal></help-modal>'});
}
示例9: copyPanel
copyPanel() {
store.set(LS_PANEL_COPY_KEY, JSON.stringify(this.panel.getSaveModel()));
appEvents.emit('alert-success', ['Panel copied. Open Add Panel to paste']);
}
示例10: toggleViewMode
toggleViewMode() {
appEvents.emit('toggle-kiosk-mode');
}