本文整理汇总了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');
}