mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
同步获取字典
This commit is contained in:
parent
dc59513f30
commit
eef52f0975
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front-next",
|
"name": "front-next",
|
||||||
"version": "5.7.2",
|
"version": "5.7.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
2
src/cool/types/index.d.ts
vendored
2
src/cool/types/index.d.ts
vendored
@ -13,7 +13,7 @@ export declare interface ModuleConfig {
|
|||||||
onLoad?(events: {
|
onLoad?(events: {
|
||||||
hasToken: (cb: () => Promise<any> | void) => Promise<any> | void;
|
hasToken: (cb: () => Promise<any> | void) => Promise<any> | void;
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}): Promise<{ [key: string]: any }> | void;
|
}): Promise<{ [key: string]: any }> | Promise<void> | void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare interface Module extends ModuleConfig {
|
export declare interface Module extends ModuleConfig {
|
||||||
|
@ -3,11 +3,11 @@ import { useDict } from "./index";
|
|||||||
|
|
||||||
export default (): ModuleConfig => {
|
export default (): ModuleConfig => {
|
||||||
return {
|
return {
|
||||||
onLoad({ hasToken }) {
|
async onLoad({ hasToken }) {
|
||||||
const { dict } = useDict();
|
const { dict } = useDict();
|
||||||
|
|
||||||
hasToken(() => {
|
await hasToken(async () => {
|
||||||
dict.refresh();
|
await dict.refresh();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user