UNPKG

@syncfusion/ej2-vue-diagrams

Version:

Feature-rich diagram control to create diagrams like flow charts, organizational charts, mind maps, and BPMN diagrams. Its rich feature set includes built-in shapes, editing, serializing, exporting, printing, overview, data binding, and automatic layouts.

65 lines (64 loc) 1.64 kB
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base'; import { isNullOrUndefined } from '@syncfusion/ej2-base'; export var PortsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-node-ports'; } } }); export var PortsPlugin = { name: 'e-node-ports', install: function (Vue) { Vue.component(PortsPlugin.name, PortsDirective); } }; /** * `e-port` directive represent a port of the vue Diagram. * It must be contained in a Diagram component(`ejs-diagram`). * ```html * <ejs-diagram> * <e-nodes> * <e-node> * <e-node-ports> * <e-node-port> * </e-node-port> * </e-node-ports> * </e-node> * </e-nodes> * </ejs-diagram> * ``` */ export var PortDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-node-port'; } } }); export var PortPlugin = { name: 'e-node-port', install: function (Vue) { Vue.component(PortPlugin.name, PortDirective); } };