File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
frontend/image-tool/src/businessNew/pages Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1- import { IPageHandler } from '../types' ;
1+ import { FlowAction , IPageHandler } from '../types' ;
22import { useInjectBSEditor } from '../context' ;
33import useDataFlow from '../hook/useDataflow' ;
44import pageModes from '../configs/mode' ;
55import { IFrame , MsgType } from 'image-editor' ;
6+ import useCommon from '../hook/useCommon' ;
67
78export function view ( ) : IPageHandler {
89 const editor = useInjectBSEditor ( ) ;
910 const { state, bsState } = editor ;
1011 const { loadClasses, loadDateSetClassification, loadDataFromFrameSeries } = useDataFlow ( ) ;
12+ const { onClose } = useCommon ( ) ;
1113
1214 async function init ( ) {
1315 let { query } = bsState ;
@@ -55,7 +57,13 @@ export function view(): IPageHandler {
5557 } ;
5658 editor . dataManager . setSceneDataByFrames ( [ data ] ) ;
5759 }
58- function onAction ( ) { }
60+ function onAction ( action : FlowAction ) {
61+ switch ( action ) {
62+ case FlowAction . close :
63+ onClose ( ) ;
64+ break ;
65+ }
66+ }
5967
6068 return { init, onAction } ;
6169}
You can’t perform that action at this time.
0 commit comments