@kengic/vue 0.25.4-beta.9 → 0.25.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kengic-vue.js +15814 -12631
- package/dist/project/build/vite/plugin/index.ts +0 -4
- package/dist/src/config/index.d.ts +1 -1
- package/dist/src/config/setup/index.d.ts +3 -0
- package/dist/src/config/{setup.d.ts → setup/setup.d.ts} +4 -20
- package/dist/src/config/setup/setupKgLocale.d.ts +29 -0
- package/dist/src/config/setup/setupKgStore.d.ts +18 -0
- package/dist/src/project/src/components/Dropdown/src/typing.d.ts +1 -1
- package/dist/src/project/src/enums/cacheEnum.d.ts +1 -1
- package/dist/src/project/src/locales/index.d.ts +1 -0
- package/dist/src/project/src/locales/setupI18n.d.ts +4 -0
- package/dist/src/project/src/settings/index.d.ts +0 -1
- package/dist/src/project/src/store/modules/locale.d.ts +0 -16
- package/dist/src/utils/kg-logger.util.d.ts +1 -1
- package/package.json +1 -1
- package/dist/src/project/src/settings/localeSetting.d.ts +0 -7
@@ -11,7 +11,6 @@ import windiCSS from 'vite-plugin-windicss';
|
|
11
11
|
import { configCompressPlugin } from './compress';
|
12
12
|
import { configHtmlPlugin } from './html';
|
13
13
|
import { configImageminPlugin } from './imagemin';
|
14
|
-
// import { configMockPlugin } from './mock';
|
15
14
|
import { configPwaConfig } from './pwa';
|
16
15
|
import { configStyleImportPlugin } from './styleImport';
|
17
16
|
import { configSvgIconsPlugin } from './svgSprite';
|
@@ -46,9 +45,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
|
|
46
45
|
// vite-plugin-svg-icons
|
47
46
|
vitePlugins.push(configSvgIconsPlugin(isBuild));
|
48
47
|
|
49
|
-
// vite-plugin-mock
|
50
|
-
// VITE_USE_MOCK && vitePlugins.push(configMockPlugin(isBuild));
|
51
|
-
|
52
48
|
// vite-plugin-purge-icons
|
53
49
|
vitePlugins.push(purgeIcons());
|
54
50
|
|
@@ -1,24 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { StoreDefinition } from 'pinia';
|
2
2
|
import { App } from 'vue';
|
3
3
|
import { Router } from 'vue-router';
|
4
|
-
import { IKgOption, P } from '
|
5
|
-
/**
|
6
|
-
* 配置 pinia 实例.
|
7
|
-
* @param pinia pinia 实例.
|
8
|
-
*/
|
9
|
-
export declare function setPinia(pinia: Pinia): void;
|
10
|
-
/**
|
11
|
-
* 获取 pinia 实例.
|
12
|
-
* @return {} pinia 实例.
|
13
|
-
* @throws Error 如果 pinia 实例为空, 抛错.
|
14
|
-
*/
|
15
|
-
export declare function getPinia(): Pinia | null;
|
16
|
-
/**
|
17
|
-
* 设置 pinia.
|
18
|
-
*
|
19
|
-
* @param pinia pinia.
|
20
|
-
*/
|
21
|
-
export declare function setupKgStore(pinia: Pinia): void;
|
4
|
+
import { IKgOption, P } from '../index.store';
|
22
5
|
export declare type IKgOptions = {
|
23
6
|
/**
|
24
7
|
* 语言数据.
|
@@ -38,6 +21,7 @@ export declare type IKgOptions = {
|
|
38
21
|
};
|
39
22
|
/**
|
40
23
|
* 初始化组件库.
|
24
|
+
*
|
41
25
|
* @param options 参数.
|
42
26
|
*/
|
43
|
-
export declare function setup(options: IKgOptions): void
|
27
|
+
export declare function setup(options: IKgOptions): Promise<void>;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { DropMenu } from '../../project/src/components/Dropdown/src/typing';
|
2
|
+
import { LocaleSetting, LocaleType } from '../../project/types/config';
|
3
|
+
export declare const LOCALE: {
|
4
|
+
KO_KR: LocaleType;
|
5
|
+
EN: LocaleType;
|
6
|
+
VI_VN: LocaleType;
|
7
|
+
ZH_CN: LocaleType;
|
8
|
+
ES_ES: LocaleType;
|
9
|
+
FR_FR: LocaleType;
|
10
|
+
KM_KH: LocaleType;
|
11
|
+
};
|
12
|
+
export declare let localeList: DropMenu[];
|
13
|
+
export declare const localeSetting: LocaleSetting;
|
14
|
+
export declare type IKgLocaleOptions = {
|
15
|
+
/**
|
16
|
+
* <p>可选语言. 如果为空则为所有语言.</p>
|
17
|
+
*/
|
18
|
+
availableLocales?: Array<LocaleType>;
|
19
|
+
/**
|
20
|
+
* 默认语言.
|
21
|
+
*
|
22
|
+
* @default 'zh_CN'.
|
23
|
+
*/
|
24
|
+
defaultLocale?: LocaleType;
|
25
|
+
};
|
26
|
+
/**
|
27
|
+
* 配置语言.
|
28
|
+
*/
|
29
|
+
export declare function setupKgLocale(options?: IKgLocaleOptions): void;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Pinia } from 'pinia';
|
2
|
+
/**
|
3
|
+
* 配置 pinia 实例.
|
4
|
+
* @param pinia pinia 实例.
|
5
|
+
*/
|
6
|
+
export declare function setPinia(pinia: Pinia): void;
|
7
|
+
/**
|
8
|
+
* 获取 pinia 实例.
|
9
|
+
* @return {} pinia 实例.
|
10
|
+
* @throws Error 如果 pinia 实例为空, 抛错.
|
11
|
+
*/
|
12
|
+
export declare function getPinia(): Pinia | null;
|
13
|
+
/**
|
14
|
+
* 设置 pinia.
|
15
|
+
*
|
16
|
+
* @param pinia pinia.
|
17
|
+
*/
|
18
|
+
export declare function setupKgStore(pinia: Pinia): void;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare const TOKEN_KEY = "TOKEN__";
|
2
|
-
export declare const LOCALE_KEY = "LOCALE__";
|
3
2
|
export declare const USER_INFO_KEY = "USER__INFO__";
|
3
|
+
export declare const LOCALE_KEY = "LOCALE__";
|
4
4
|
export declare const ROLES_KEY = "ROLES__KEY__";
|
5
5
|
export declare const USER_WAREHOUSE_KEY = "USER_WAREHOUSE__KEY__";
|
6
6
|
export declare const DB_DICT_DATA_KEY = "UI_CACHE_DB_DICT_DATA";
|
@@ -16,15 +16,7 @@ export declare const _useLocaleStore: import("pinia").StoreDefinition<"app-local
|
|
16
16
|
pathTitleMap: object;
|
17
17
|
} & import("pinia").PiniaCustomStateProperties<LocaleState>) => (path: any) => any;
|
18
18
|
}, {
|
19
|
-
/**
|
20
|
-
* Set up multilingual information and cache
|
21
|
-
* @param info multilingual info
|
22
|
-
*/
|
23
19
|
setLocaleInfo(info: Partial<LocaleSetting>): void;
|
24
|
-
/**
|
25
|
-
* Initialize multilingual information and load the existing configuration from the local cache
|
26
|
-
*/
|
27
|
-
initLocale(): void;
|
28
20
|
setPathTitle(path: any, title: any): void;
|
29
21
|
}>;
|
30
22
|
export declare function useLocaleStore(): import("pinia").Store<"app-locale", LocaleState, {
|
@@ -40,15 +32,7 @@ export declare function useLocaleStore(): import("pinia").Store<"app-locale", Lo
|
|
40
32
|
pathTitleMap: object;
|
41
33
|
} & import("pinia").PiniaCustomStateProperties<LocaleState>) => (path: any) => any;
|
42
34
|
}, {
|
43
|
-
/**
|
44
|
-
* Set up multilingual information and cache
|
45
|
-
* @param info multilingual info
|
46
|
-
*/
|
47
35
|
setLocaleInfo(info: Partial<LocaleSetting>): void;
|
48
|
-
/**
|
49
|
-
* Initialize multilingual information and load the existing configuration from the local cache
|
50
|
-
*/
|
51
|
-
initLocale(): void;
|
52
36
|
setPathTitle(path: any, title: any): void;
|
53
37
|
}>;
|
54
38
|
export {};
|
@@ -35,7 +35,7 @@ declare class KgLogger {
|
|
35
35
|
* @param collapsed 是否折叠.
|
36
36
|
* @param style 样式.
|
37
37
|
*/
|
38
|
-
static log(level: "
|
38
|
+
static log(level: "debug" | "info" | "warn" | "error" | "deprecated" | undefined, message: string, args?: Record<string, any>, collapsed?: boolean, style?: string | null): void;
|
39
39
|
/**
|
40
40
|
* 打印警告日志.
|
41
41
|
*
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.25.
|
3
|
+
"version": "0.25.5-beta.0",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { LocaleSetting, LocaleType } from '../../types/config';
|
2
|
-
import { DropMenu } from '../components/Dropdown/src/typing';
|
3
|
-
export declare const LOCALE: {
|
4
|
-
[key: string]: LocaleType;
|
5
|
-
};
|
6
|
-
export declare const localeList: DropMenu[];
|
7
|
-
export declare const localeSetting: LocaleSetting;
|