mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 11:56:53 +08:00
feat: undo/redo for workflow editor (#3927)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { memo } from 'react'
|
||||
import { MiniMap } from 'reactflow'
|
||||
import UndoRedo from '../header/undo-redo'
|
||||
import ZoomInOut from './zoom-in-out'
|
||||
import Control from './control'
|
||||
|
||||
const Operator = () => {
|
||||
export type OperatorProps = {
|
||||
handleUndo: () => void
|
||||
handleRedo: () => void
|
||||
}
|
||||
|
||||
const Operator = ({ handleUndo, handleRedo }: OperatorProps) => {
|
||||
return (
|
||||
<>
|
||||
<MiniMap
|
||||
@@ -15,6 +21,7 @@ const Operator = () => {
|
||||
/>
|
||||
<div className='flex items-center mt-1 gap-2 absolute left-4 bottom-4 z-[9]'>
|
||||
<ZoomInOut />
|
||||
<UndoRedo handleUndo={handleUndo} handleRedo={handleRedo} />
|
||||
<Control />
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user