feat: 代码生成
This commit is contained in:
15
apps/web-antd/src/views/tool/gen/mitt.ts
Normal file
15
apps/web-antd/src/views/tool/gen/mitt.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user