ruoyi-plus-vben5/apps/web-antd/src/views/tool/gen/mitt.ts
2024-09-24 10:18:07 +08:00

16 lines
242 B
TypeScript

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);
}