mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2026-02-26 05:00:32 +00:00
优化菜单导入
This commit is contained in:
parent
8deaa90fd4
commit
d117b84dd1
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-midway/core",
|
||||
"version": "7.1.17",
|
||||
"version": "7.1.18",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"typings": "index.d.ts",
|
||||
|
||||
@ -1,4 +1,14 @@
|
||||
import { App, Config, ILogger, IMidwayApplication, Inject, Logger, Provide, Scope, ScopeEnum } from "@midwayjs/core";
|
||||
import {
|
||||
App,
|
||||
Config,
|
||||
ILogger,
|
||||
IMidwayApplication,
|
||||
Inject,
|
||||
Logger,
|
||||
Provide,
|
||||
Scope,
|
||||
ScopeEnum,
|
||||
} from "@midwayjs/core";
|
||||
import * as fs from "fs";
|
||||
import { CoolModuleConfig } from "./config";
|
||||
import * as path from "path";
|
||||
@ -11,7 +21,6 @@ import { CoolEventManager } from "../event";
|
||||
@Provide()
|
||||
@Scope(ScopeEnum.Singleton)
|
||||
export class CoolModuleMenu {
|
||||
|
||||
@Inject()
|
||||
coolModuleConfig: CoolModuleConfig;
|
||||
|
||||
@ -37,7 +46,7 @@ export class CoolModuleMenu {
|
||||
`${this.app.getBaseDir()}`,
|
||||
"..",
|
||||
"lock",
|
||||
'menu'
|
||||
"menu"
|
||||
);
|
||||
if (!fs.existsSync(importLockPath)) {
|
||||
fs.mkdirSync(importLockPath, { recursive: true });
|
||||
@ -49,7 +58,7 @@ export class CoolModuleMenu {
|
||||
}
|
||||
}
|
||||
this.coolEventManager.emit("onMenuImport", this.datas);
|
||||
this.coolEventManager.emit("onMenuInit", {});
|
||||
// this.coolEventManager.emit("onMenuInit", {});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-midway/core",
|
||||
"version": "7.1.17",
|
||||
"version": "7.1.18",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user