Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
vue-flow-editor
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-02-20 16:23:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e93942e2bb561743caa5b71b818d24e8d4a3f86e
e93942e2
1 parent
a15df20e
fix 优化预览节点流程的背景图显示
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
15 deletions
doc/App.vue
src/editor/vue-flow-editor-canvas-form.tsx
src/editor/vue-flow-editor-form.tsx
src/editor/vue-flow-editor-toolbar.tsx
doc/App.vue
View file @
e93942e
...
...
@@ -484,7 +484,6 @@
ref="editor1"
:height="state.window_height"
:data="flowData"
:grid="showGrid"
:miniMap="showMiniMap"
:onRef="onRef1"
:multipleSelect="showMultipleSelect"
...
...
@@ -500,8 +499,8 @@
</div>
<template #footer>
<span class="dialog-footer">
<
el-button @click="state.dialogPreviewVisible = false">取消</el-button
>
<el-button color="#009688" @click="state.dialogPreviewVisible = false">
确认
</el-button>
<
!-- <el-button @click="state.dialogPreviewVisible = false">取消</el-button> --
>
<el-button color="#009688" @click="state.dialogPreviewVisible = false">
关闭
</el-button>
</span>
</template>
</el-dialog>
...
...
@@ -2249,6 +2248,14 @@ export default {
// 触发resize事件
window.dispatchEvent(resizeEvent);
setTimeout(() => {
nextTick(() => {
// 预览流程图的背景
$('.preview-container').find('.g6-grid').parent().css('zIndex', '0');
$('.preview-container').find('canvas').css('zIndex', '1').css('position', 'relative');
})
}, 500);
}
/**
...
...
@@ -2619,6 +2626,7 @@ body {
}
.preview-detail-container {
position: fixed;
z-index: 9;
width: 30vw;
height: 80vh;
top: 10vh;
...
...
src/editor/vue-flow-editor-canvas-form.tsx
View file @
e93942e
...
...
@@ -5,7 +5,6 @@ import {useBehavior} from "@/behavior";
import {GraphStyle} from "@/utils/styles";
import {registerShape} from "@/shape";
import {formatNodeModel,formatNodeModel_control} from "@/utils/utils";
import $ from "jquery";
registerShape(G6)
export default {
...
...
@@ -25,16 +24,14 @@ export default {
function onMouseout(e: MouseEvent) {commander.destroyEvent()}
function refresh() {
if (!!editorState.graph) {
editorState.graph.destroy()
}
nextTick(() => {
if (!!editorState.graph) {
editorState.graph.destroy()
}
const target = proxy.$refs.target as HTMLElement
const {offsetHeight: height, offsetWidth: width} = proxy.$refs.root as HTMLElement
const behaviors = useBehavior({
multipleSelect: editorState.props.multipleSelect,
dragEdge: {
...
...
src/editor/vue-flow-editor-form.tsx
View file @
e93942e
...
...
@@ -38,7 +38,6 @@ export default {
const canvasProps = useCanvasProps(props)
const modelBodyStyle = computed(() => ({
width: suffixSize(props.modelWidth)
}))
...
...
src/editor/vue-flow-editor-toolbar.tsx
View file @
e93942e
...
...
@@ -76,7 +76,7 @@ export default {
},*/
{
key: 'zoomIn',
tip: '放大
CTRL+=
',
tip: '放大',
label: '放大',
icon: 'zoomIn',
handler: () => {
...
...
@@ -86,7 +86,7 @@ export default {
},
{
key: 'zoomOut',
tip: '缩小
CTRL+-
',
tip: '缩小',
label: '缩小',
icon: 'zoomOut',
handler: () => {
...
...
@@ -104,7 +104,7 @@ export default {
},
{
key: 'delete',
tip: '删除
DELETE , CTRL+D
',
tip: '删除',
label: '删除',
icon: 'delete',
handler: () => {
...
...
@@ -121,7 +121,7 @@ export default {
buttons.splice(8, 0, ...[
{
key: 'undo',
tip: '撤销
CTRL+Z
',
tip: '撤销',
label: '撤销',
icon: 'undo',
handler: () => {
...
...
@@ -131,7 +131,7 @@ export default {
},
{
key: 'redo',
tip: '重做
CTRL+SHIFT+Z
',
tip: '重做',
label: '重做',
icon: 'redo',
handler: () => {
...
...
Please
register
or
login
to post a comment