Files
auto-solution/modeler/src/views/decision/communication/register.ts

49 lines
1.1 KiB
TypeScript
Raw Normal View History

/*
* This file is part of the kernelstudio package.
*
* (c) 2014-2025 zlin <admin@kernelstudio.com>
*
* For the full copyright and license information, please view the LICENSE file
* that was distributed with this source code.
*/
2026-02-08 17:57:40 +08:00
/*
* This file is part of the kernelstudio package.
*
* (c) 2014-2025 zlin <admin@kernelstudio.com>
*
* For the full copyright and license information, please view the LICENSE file
* that was distributed with this source code.
*/
import { register } from '@antv/x6-vue-shape';
import ModelElement from './node.vue';
2026-03-15 19:32:20 +08:00
export const registerScenarioElement = () => {
console.info('registerScenarioElement');
register({
2026-03-15 19:32:20 +08:00
shape: 'scenario',
component: ModelElement,
width: 120,
attrs: {
body: {
stroke: 'transparent',
strokeWidth: 0,
fill: 'transparent',
rx: 4,
ry: 4,
},
},
dragging: {
enabled: true,
},
2026-02-08 17:57:40 +08:00
// 配置端口识别规则,
portMarkup: [
{
tagName: 'div',
selector: 'port-body',
},
],
// 告诉 X6 如何识别 Vue 组件内的端口
portAttribute: 'data-port',
});
};