ruoyi-plus-vben5/apps/web-antd/src/views/tool/gen/mitt.ts

16 lines
242 B
TypeScript
Raw Normal View History

2024-09-24 10:18:07 +08:00
import { mitt } from '@vben/utils';
type Events = {
to: number;
};
export const emitter = mitt<Events>();
/**
*
* @param step
*/
export function toCurrentStep(step: number) {
emitter.emit('to', step);
}