@kengic/vue 0.0.2-beta.5 → 0.0.2-beta.50
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/css/animation.css +91 -0
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +1730 -0
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/components/kg-page/KgPage.d.ts +3 -0
- package/dist/src/components/kg-var-profile/KgVarProfile.d.ts +6 -0
- package/dist/src/consts/i18n/en.d.ts +10 -0
- package/dist/src/consts/i18n/index.d.ts +21 -0
- package/dist/src/consts/i18n/t.d.ts +20 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +10 -0
- package/dist/src/consts/index.d.ts +15 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/utils/app.util.d.ts +17 -0
- package/dist/src/utils/file.util.d.ts +19 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/logger.util.d.ts +40 -0
- package/dist/src/utils/route.util.d.ts +6 -0
- package/package.json +41 -32
- package/dist/index.js +0 -55
- package/dist/types/components/B.d.ts +0 -6
- package/dist/types/components/ComponentA.vue.d.ts +0 -6
- package/dist/types/components/index.d.ts +0 -3
- package/dist/types/constants/MyConstants.d.ts +0 -1
- package/dist/types/constants/index.d.ts +0 -2
- package/dist/types/index.d.ts +0 -10
- package/dist/types/utils/MyUtil.d.ts +0 -5
- package/dist/types/utils/index.d.ts +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './KgPage.less';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './KgVarProfile.less';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "reset")[], "search" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
3
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
4
|
+
onSearch?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const KG_I18N: {
|
|
2
|
+
en: {
|
|
3
|
+
kg: {
|
|
4
|
+
KgVarProfile: {
|
|
5
|
+
title: string;
|
|
6
|
+
search: string;
|
|
7
|
+
reset: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
zh_CN: {
|
|
12
|
+
kg: {
|
|
13
|
+
KgVarProfile: {
|
|
14
|
+
title: string;
|
|
15
|
+
search: string;
|
|
16
|
+
reset: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export * from './t';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare type T = {
|
|
2
|
+
(key: string): string;
|
|
3
|
+
(key: string, locale: string): string;
|
|
4
|
+
(key: string, locale: string, list: unknown[]): string;
|
|
5
|
+
(key: string, locale: string, named: Record<string, unknown>): string;
|
|
6
|
+
(key: string, list: unknown[]): string;
|
|
7
|
+
(key: string, named: Record<string, unknown>): string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* 配置翻译方法.
|
|
11
|
+
* @param i18n vue-i18n 的国际化配置.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setupT(i18n: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* 翻译.
|
|
16
|
+
* @param key
|
|
17
|
+
* @param arg
|
|
18
|
+
*/
|
|
19
|
+
export declare const t: T;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './i18n';
|
|
2
|
+
/** 所有模块. */
|
|
3
|
+
export declare const enum KG_APPS_ENUM {
|
|
4
|
+
DATA_MANAGER = "data-manager",
|
|
5
|
+
BUSINESS_MANAGER = "business-manager",
|
|
6
|
+
SYS = "sys"
|
|
7
|
+
}
|
|
8
|
+
/** 模块路径前缀. */
|
|
9
|
+
export declare const enum KG_APPS_PREFIXS_ENUM {
|
|
10
|
+
DATA_MANAGER = "/wms/data-manager",
|
|
11
|
+
BUSINESS_MANAGER = "/wms/business-manager",
|
|
12
|
+
SYS = "/sys"
|
|
13
|
+
}
|
|
14
|
+
/** 所有模块. */
|
|
15
|
+
export declare const KG_APPS: Array<KG_APPS_ENUM>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KG_APPS_ENUM } from '../consts';
|
|
2
|
+
/**
|
|
3
|
+
* 判断某个路径是否属于某个模块.
|
|
4
|
+
* @param path 路径.
|
|
5
|
+
* @param app 模块.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isPathInApp(path: string | undefined | null, app: KG_APPS_ENUM): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 根据地址获取模块.
|
|
10
|
+
* @param path 地址.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAppByPath(path: string): KG_APPS_ENUM;
|
|
13
|
+
/**
|
|
14
|
+
* 获取模块首页地址.
|
|
15
|
+
* @param app 模块.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getAppIndexPath(app: KG_APPS_ENUM): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 根据'文件大小数值'获取'文件大小文本'.
|
|
3
|
+
* @param size 文件大小数值.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getFileSize(size: any): string;
|
|
6
|
+
/**
|
|
7
|
+
* base64 转换为 blob.
|
|
8
|
+
* @param base64 base64 字符串.
|
|
9
|
+
* @param contentType 文件类型.
|
|
10
|
+
* @param sliceSize 分块大小.
|
|
11
|
+
*/
|
|
12
|
+
export declare function base64toBlob(base64: string, contentType: string, sliceSize?: number): Blob;
|
|
13
|
+
/**
|
|
14
|
+
* 下载文件.
|
|
15
|
+
* @param data 文件数据.
|
|
16
|
+
* @param fileName 文件名称, 包含后缀.
|
|
17
|
+
* @param contentType 文件类型.
|
|
18
|
+
*/
|
|
19
|
+
export declare function downloadFile(data: string | BlobPart, fileName: string, contentType: string): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 日志服务.
|
|
3
|
+
*/
|
|
4
|
+
declare class Logger {
|
|
5
|
+
/**
|
|
6
|
+
* 打印错误日志.
|
|
7
|
+
*
|
|
8
|
+
* @param message 提示消息.
|
|
9
|
+
* @param args 数据对象.
|
|
10
|
+
* @param collapsed 是否折叠.
|
|
11
|
+
*/
|
|
12
|
+
static error(message: string, args?: Record<string, any>, collapsed?: boolean): void;
|
|
13
|
+
/**
|
|
14
|
+
* 打印普通日志.
|
|
15
|
+
*
|
|
16
|
+
* @param message 提示消息.
|
|
17
|
+
* @param args 数据对象.
|
|
18
|
+
* @param collapsed 是否折叠.
|
|
19
|
+
*/
|
|
20
|
+
static info(message: string, args: Record<string, any>, collapsed?: boolean): void;
|
|
21
|
+
/**
|
|
22
|
+
* 打印日志.
|
|
23
|
+
*
|
|
24
|
+
* @param level 日志等级.
|
|
25
|
+
* @param message 提示消息.
|
|
26
|
+
* @param args 数据对象.
|
|
27
|
+
* @param collapsed 是否折叠.
|
|
28
|
+
* @param style 提示消息样式.
|
|
29
|
+
*/
|
|
30
|
+
static log(level: "info" | "warn" | "error" | undefined, message: string, args?: Record<string, any>, collapsed?: boolean, style?: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* 打印警告日志.
|
|
33
|
+
*
|
|
34
|
+
* @param message 提示消息.
|
|
35
|
+
* @param args 数据对象.
|
|
36
|
+
* @param collapsed 是否折叠.
|
|
37
|
+
*/
|
|
38
|
+
static warn(message: string, args: Record<string, any>, collapsed?: boolean): void;
|
|
39
|
+
}
|
|
40
|
+
export { Logger };
|
package/package.json
CHANGED
|
@@ -1,49 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kengic/vue",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
4
|
-
"types": "./dist/types/index.d.ts",
|
|
5
|
-
"module": "./dist/index.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": {
|
|
8
|
-
"import": "./dist/index.js"
|
|
9
|
-
},
|
|
10
|
-
"./dist/index.css": "./dist/index.css"
|
|
11
|
-
},
|
|
3
|
+
"version": "0.0.2-beta.50",
|
|
12
4
|
"scripts": {
|
|
13
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
14
|
-
"bump-version:beta": "ts-node --project=./scripts/tsconfig.json scripts/bump-version.ts beta",
|
|
15
|
-
"bump-version:major": "ts-node --project=./scripts/tsconfig.json scripts/bump-version.ts major",
|
|
16
|
-
"bump-version:minor": "ts-node --project=./scripts/tsconfig.json scripts/bump-version.ts minor",
|
|
17
|
-
"bump-version:patch": "ts-node --project=./scripts/tsconfig.json scripts/bump-version.ts patch",
|
|
18
|
-
"publish:all": "ts-node --project=./scripts/tsconfig.json scripts/publish.ts",
|
|
19
6
|
"publish:all:beta": "npm run bump-version:beta && npm run publish:all",
|
|
20
|
-
"publish:all:major": "npm run bump-version:major && npm run publish:all",
|
|
21
|
-
"publish:all:minor": "npm run bump-version:minor && npm run publish:all",
|
|
22
7
|
"publish:all:patch": "npm run bump-version:patch && npm run publish:all",
|
|
8
|
+
"publish:all:minor": "npm run bump-version:minor && npm run publish:all",
|
|
9
|
+
"publish:all:major": "npm run bump-version:major && npm run publish:all",
|
|
10
|
+
"bump-version-to-projects:luotao.wms-vue3": "tsx ./scripts/bump-version-to-projects.luotao.wms-vue3.ts",
|
|
11
|
+
"copy-to-projects:luotao.wms-vue3": "tsx ./scripts/copy-to-projects.luotao.wms-vue3.ts",
|
|
12
|
+
"--------------------": "",
|
|
13
|
+
"bump-version:beta": "tsx scripts/bump-version.ts beta",
|
|
14
|
+
"bump-version:major": "tsx scripts/bump-version.ts major",
|
|
15
|
+
"bump-version:minor": "tsx scripts/bump-version.ts minor",
|
|
16
|
+
"bump-version:patch": "tsx scripts/bump-version.ts patch",
|
|
17
|
+
"publish:all": "tsx scripts/publish.ts",
|
|
23
18
|
"publish:npm": "npmrc kengic && npm publish ./ --registry https://registry.npmjs.org/ --access public"
|
|
24
19
|
},
|
|
25
20
|
"peerDependencies": {
|
|
26
21
|
"vue": "~3.2.45"
|
|
27
22
|
},
|
|
28
23
|
"dependencies": {
|
|
29
|
-
"ant-design-vue": "
|
|
24
|
+
"@ant-design/icons-vue": "~6.1.0",
|
|
25
|
+
"ant-design-vue": "~3.2.15",
|
|
26
|
+
"filesize": "10.0.6",
|
|
27
|
+
"lodash-es": "~4.17.21"
|
|
30
28
|
},
|
|
31
29
|
"devDependencies": {
|
|
32
|
-
"@types/
|
|
33
|
-
"@types/
|
|
34
|
-
"@
|
|
35
|
-
"@vitejs/plugin-vue
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"vue
|
|
30
|
+
"@types/lodash-es": "~4.17.7",
|
|
31
|
+
"@types/node": "~18.14.6",
|
|
32
|
+
"@types/semver": "~7.3.13",
|
|
33
|
+
"@vitejs/plugin-vue": "~3.2.0",
|
|
34
|
+
"@vitejs/plugin-vue-jsx": "~1.3.10",
|
|
35
|
+
"chalk": "~4.1.2",
|
|
36
|
+
"less": "~4.1.3",
|
|
37
|
+
"prettier": "~2.8.4",
|
|
38
|
+
"rimraf": "~3.0.2",
|
|
39
|
+
"rollup": "~2.79.1",
|
|
40
|
+
"semver": "~7.3.8",
|
|
41
|
+
"tsx": "~3.12.3",
|
|
42
|
+
"typescript": "~4.8.4",
|
|
43
|
+
"vite": "~3.2.5",
|
|
44
|
+
"vue": "~3.2.45",
|
|
45
|
+
"vue-tsc": "~1.2.0"
|
|
46
|
+
},
|
|
47
|
+
"main": "./dist/kengic-vue.js",
|
|
48
|
+
"module": "./dist/kengic-vue.js",
|
|
49
|
+
"types": "./dist/src/index.d.ts",
|
|
50
|
+
"exports": {
|
|
51
|
+
".": {
|
|
52
|
+
"import": "./dist/kengic-vue.js"
|
|
53
|
+
},
|
|
54
|
+
"./dist/index.css": "./dist/index.css",
|
|
55
|
+
"./dist/css/animation.css": "./dist/css/animation.css"
|
|
47
56
|
},
|
|
48
57
|
"prettier": {
|
|
49
58
|
"endOfLine": "auto",
|
package/dist/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, defineProps as a, createVNode as n, openBlock as p, createElementBlock as i, Fragment as m, createElementVNode as u, toDisplayString as d, unref as o, withCtx as f, createTextVNode as _ } from "vue";
|
|
2
|
-
import { Button as l } from "ant-design-vue";
|
|
3
|
-
const s = /* @__PURE__ */ c({
|
|
4
|
-
setup() {
|
|
5
|
-
const e = a({
|
|
6
|
-
name: String
|
|
7
|
-
});
|
|
8
|
-
return () => n(l, {
|
|
9
|
-
type: "ghost"
|
|
10
|
-
}, {
|
|
11
|
-
default: () => [e.name]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}), g = /* @__PURE__ */ c({
|
|
15
|
-
__name: "ComponentA",
|
|
16
|
-
props: { msg: String },
|
|
17
|
-
setup(e) {
|
|
18
|
-
return (t, b) => (p(), i(m, null, [
|
|
19
|
-
u("div", null, "Hello " + d(e.msg) + "!", 1),
|
|
20
|
-
n(o(l), { type: "primary" }, {
|
|
21
|
-
default: f(() => [
|
|
22
|
-
_("CLICK")
|
|
23
|
-
]),
|
|
24
|
-
_: 1
|
|
25
|
-
}),
|
|
26
|
-
n(o(s), { name: "FOO" })
|
|
27
|
-
], 64));
|
|
28
|
-
}
|
|
29
|
-
}), r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
30
|
-
__proto__: null,
|
|
31
|
-
B: s,
|
|
32
|
-
ComponentA: g
|
|
33
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
34
|
-
const y = 100, O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
35
|
-
__proto__: null,
|
|
36
|
-
MAGIC_NUM: y
|
|
37
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
38
|
-
function C(e, t) {
|
|
39
|
-
return e + t;
|
|
40
|
-
}
|
|
41
|
-
const j = {
|
|
42
|
-
add: C
|
|
43
|
-
};
|
|
44
|
-
function S(e) {
|
|
45
|
-
for (const t in r)
|
|
46
|
-
e.component(t, r[t]);
|
|
47
|
-
}
|
|
48
|
-
const A = { install: S };
|
|
49
|
-
export {
|
|
50
|
-
s as B,
|
|
51
|
-
g as ComponentA,
|
|
52
|
-
O as MyConstants,
|
|
53
|
-
j as MyUtil,
|
|
54
|
-
A as default
|
|
55
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const B: import("vue").DefineComponent<{
|
|
2
|
-
name: string;
|
|
3
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
4
|
-
name: string;
|
|
5
|
-
}>, {}>;
|
|
6
|
-
export { B };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
msg: StringConstructor;
|
|
3
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
-
msg: StringConstructor;
|
|
5
|
-
}>>, {}>;
|
|
6
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MAGIC_NUM = 100;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type App } from 'vue';
|
|
2
|
-
declare function install(app: App): void;
|
|
3
|
-
import './assets/index.less';
|
|
4
|
-
export * from './components';
|
|
5
|
-
export * from './constants';
|
|
6
|
-
export * from './utils';
|
|
7
|
-
declare const _default: {
|
|
8
|
-
install: typeof install;
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|