初始化项目,自 v1.7.1 版本开始

This commit is contained in:
YunaiV
2023-02-11 00:44:00 +08:00
parent 11161afc1a
commit 56f3017baa
548 changed files with 52096 additions and 61 deletions

View File

@@ -0,0 +1,41 @@
<template>
<div class="my-process-palette">
<div class="test-button" @click="addTask" @mousedown="addTask">测试任务</div>
<div class="test-container" id="palette-container">1</div>
</div>
</template>
<script setup lang="ts" name="MyProcessPalette">
import { assign } from 'min-dash'
const addTask = (event, options = {}) => {
const ElementFactory = window.bpmnInstances.elementFactory
const create = window.bpmnInstances.modeler.get('create')
console.log(ElementFactory, create)
const shape = ElementFactory.createShape(assign({ type: 'bpmn:UserTask' }, options))
if (options) {
shape.businessObject.di.isExpanded = options.isExpanded
}
console.log(event, 'event')
console.log(shape, 'shape')
create.start(event, shape)
}
</script>
<style scoped lang="scss">
.my-process-palette {
box-sizing: border-box;
padding: 80px 20px 20px 20px;
.test-button {
box-sizing: border-box;
padding: 8px 16px;
border-radius: 4px;
border: 1px solid rgba(24, 144, 255, 0.8);
cursor: pointer;
}
}
</style>