fix : 修复工作流流程新增bug
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-popover :visible="visible" placement="bottom-start" title="添加流程节点" width="350">
|
||||
<el-popover :visible="visible" placement="bottom-start" title="添加流程节点" width="306">
|
||||
<div class="node-select">
|
||||
<div @click="addApprovalNode">
|
||||
<el-icon style="color:rgb(255, 148, 62);">
|
||||
@@ -39,18 +39,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<template #reference>
|
||||
<el-button :icon="Plus" slot="reference" type="primary" @click="visible = !visible" size="small" circle></el-button>
|
||||
<!-- <el-button :icon="Plus" slot="reference" type="primary" @click="visible = !visible" size="small"-->
|
||||
<!-- circle></el-button>-->
|
||||
<el-icon @click="visible = !visible" color="#fff" style="background-color:#2E7CF0;border-radius: 50%;cursor: pointer" ><Plus /></el-icon>
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {Plus } from '@element-plus/icons-vue'
|
||||
|
||||
import {Plus, Clock, SetUp, Operation, Share, Promotion, Coordinate} from '@element-plus/icons-vue'
|
||||
const emit = defineEmits(['insertNode'])
|
||||
const visible = ref(false)
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener('click', nullBlockClick)
|
||||
})
|
||||
/**
|
||||
* 点击空白处, 清除选项选中状态
|
||||
*/
|
||||
const nullBlockClick = (e) => {
|
||||
if(!(e.target.tagName==='svg'||e.target.tagName==='path')){
|
||||
disVisible()
|
||||
}
|
||||
}
|
||||
const addApprovalNode = () => {
|
||||
emit('insertNode', "APPROVAL")
|
||||
disVisible()
|
||||
|
||||
Reference in New Issue
Block a user