Showing
2 changed files
with
5 additions
and
7 deletions
| ... | @@ -501,7 +501,6 @@ | ... | @@ -501,7 +501,6 @@ |
| 501 | </div> | 501 | </div> |
| 502 | <template #footer> | 502 | <template #footer> |
| 503 | <span class="dialog-footer"> | 503 | <span class="dialog-footer"> |
| 504 | - <!~~ <el-button @click="state.dialogPreviewVisible = false">取消</el-button> ~~> | ||
| 505 | <el-button color="#009688" @click="state.dialogPreviewVisible = false">关闭</el-button> | 504 | <el-button color="#009688" @click="state.dialogPreviewVisible = false">关闭</el-button> |
| 506 | </span> | 505 | </span> |
| 507 | </template> | 506 | </template> |
| ... | @@ -821,7 +820,7 @@ export default { | ... | @@ -821,7 +820,7 @@ export default { |
| 821 | // 内部刷新graph数据 | 820 | // 内部刷新graph数据 |
| 822 | nextTick(() => { | 821 | nextTick(() => { |
| 823 | editor.editorState.graph.read(flowData.value) | 822 | editor.editorState.graph.read(flowData.value) |
| 824 | - editor1?.editorState.graph.read(rawFlowData.value) | 823 | + editor1?.editorState.graph?.read(rawFlowData.value) |
| 825 | }); | 824 | }); |
| 826 | } | 825 | } |
| 827 | 826 | ||
| ... | @@ -2324,7 +2323,7 @@ export default { | ... | @@ -2324,7 +2323,7 @@ export default { |
| 2324 | $('.preview-container').find('.g6-grid').parent().css('zIndex', '0'); | 2323 | $('.preview-container').find('.g6-grid').parent().css('zIndex', '0'); |
| 2325 | $('.preview-container').find('canvas').css('zIndex', '1').css('position', 'relative'); | 2324 | $('.preview-container').find('canvas').css('zIndex', '1').css('position', 'relative'); |
| 2326 | }) | 2325 | }) |
| 2327 | - }, 500); | 2326 | + }, 1000); |
| 2328 | } | 2327 | } |
| 2329 | 2328 | ||
| 2330 | /** | 2329 | /** |
| ... | @@ -2336,13 +2335,11 @@ export default { | ... | @@ -2336,13 +2335,11 @@ export default { |
| 2336 | console.warn('点击节点,如果预览状态,可以预览表单内容'); | 2335 | console.warn('点击节点,如果预览状态,可以预览表单内容'); |
| 2337 | 2336 | ||
| 2338 | const model = G6.Util.clone(e.item.get('model')); // 节点的基本属性 | 2337 | const model = G6.Util.clone(e.item.get('model')); // 节点的基本属性 |
| 2338 | + console.log("🚀 ~ file: App.vue:2338 ~ onClickNodePreview ~ model.id:", model.id); | ||
| 2339 | model.style = model.style || {} | 2339 | model.style = model.style || {} |
| 2340 | model.labelCfg = model.labelCfg || { style: {} } | 2340 | model.labelCfg = model.labelCfg || { style: {} } |
| 2341 | - | ||
| 2342 | model.data = model.data ? model.data : {}; | 2341 | model.data = model.data ? model.data : {}; |
| 2343 | 2342 | ||
| 2344 | - // state.detailModel = model; | ||
| 2345 | - console.warn(model); | ||
| 2346 | if (model.id === 'end-node' || model.id === 'start-node') { | 2343 | if (model.id === 'end-node' || model.id === 'start-node') { |
| 2347 | ElNotification.error('该节点无法预览'); | 2344 | ElNotification.error('该节点无法预览'); |
| 2348 | state.preview_form_url = null; | 2345 | state.preview_form_url = null; | ... | ... |
| ... | @@ -29,7 +29,7 @@ export default { | ... | @@ -29,7 +29,7 @@ export default { |
| 29 | editorState.graph.destroy() | 29 | editorState.graph.destroy() |
| 30 | } | 30 | } |
| 31 | const target = proxy.$refs.target as HTMLElement | 31 | const target = proxy.$refs.target as HTMLElement |
| 32 | - | 32 | + if (proxy.$refs.root) { |
| 33 | const {offsetHeight: height, offsetWidth: width} = proxy.$refs.root as HTMLElement | 33 | const {offsetHeight: height, offsetWidth: width} = proxy.$refs.root as HTMLElement |
| 34 | 34 | ||
| 35 | const behaviors = useBehavior({ | 35 | const behaviors = useBehavior({ |
| ... | @@ -74,6 +74,7 @@ export default { | ... | @@ -74,6 +74,7 @@ export default { |
| 74 | graph.read(props.data) | 74 | graph.read(props.data) |
| 75 | useEditorPlugins(props, graph) | 75 | useEditorPlugins(props, graph) |
| 76 | editorState.setGraph(graph) | 76 | editorState.setGraph(graph) |
| 77 | + } | ||
| 77 | }) | 78 | }) |
| 78 | // const target = proxy.$refs.target as HTMLElement | 79 | // const target = proxy.$refs.target as HTMLElement |
| 79 | 80 | ... | ... |
-
Please register or login to post a comment