yxuse 1.0.87 → 1.0.89
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/lib/api.cjs.js +1 -1
- package/lib/api.es.js +6 -6
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +7 -7
- package/lib/directives.cjs.js +1 -1
- package/lib/directives.es.js +19 -4
- package/lib/icons.cjs.js +1 -1
- package/lib/icons.es.js +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs2.js +3 -17
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs4.js +1 -1
- package/lib/index.cjs5.js +1 -1
- package/lib/index.cjs6.js +3 -3
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.es.js +12 -8
- package/lib/index.es2.js +1144 -2499
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es3.js +37 -23
- package/lib/index.es4.js +1 -1
- package/lib/index.es5.js +12 -12
- package/lib/index.es6.js +721 -3100
- package/lib/index.es6.js.gz +0 -0
- package/lib/style.cjs.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/style.es.js +1 -4
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +2 -2
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +2 -2
- package/package.json +24 -15
- package/types/api/auth/index.d.ts +50 -0
- package/types/api/index.d.ts +18 -0
- package/types/api/modules/auth/index.d.ts +13 -0
- package/types/components/Common/DynamicComponent/index.vue.d.ts +20 -0
- package/types/components/SearchForm/index.d.ts +3 -0
- package/types/components/SearchForm/index.vue.d.ts +2 -0
- package/types/components/Toolbar/index.d.ts +37 -0
- package/types/components/Toolbar/src/index.config.d.ts +47 -0
- package/types/components/Toolbar/src/index.vue.d.ts +2 -0
- package/types/components/Toolbar/src/utils/mounted.d.ts +0 -0
- package/types/components/Toolbar/src/utils/move.d.ts +4 -0
- package/types/components/Update/index.d.ts +1 -0
- package/types/components/Update/index.vue.d.ts +17 -0
- package/types/components/YxTable/index.d.ts +81 -0
- package/types/components/YxTable/index.vue.d.ts +24 -0
- package/types/components/YxTable/type.d.ts +76 -0
- package/types/components/YxTable3/index.d.ts +1 -0
- package/types/components/YxTable3/src/index.d.ts +31 -0
- package/types/components/index.d.ts +4 -0
- package/types/components/type.d.ts +1 -0
- package/types/config/index.d.ts +6 -0
- package/types/directives/index.d.ts +5 -0
- package/types/directives/modules/auth.d.ts +3 -0
- package/types/icons/index.d.ts +1 -0
- package/types/icons/src/index.d.ts +2 -0
- package/types/index.d.ts +8 -0
- package/types/theme/config.d.ts +1 -0
- package/types/theme/index.d.ts +41 -0
- package/types/utils/common/index.d.ts +33 -0
- package/types/utils/common/update.d.ts +3 -0
- package/types/utils/common/util.d.ts +6 -0
- package/types/utils/http/config.d.ts +24 -0
- package/types/utils/http/index.d.ts +40 -0
- package/types/utils/http/interface.d.ts +5 -0
- package/types/utils/index.d.ts +3 -0
- package/types/utils/subscribe/index.d.ts +13 -0
- package/lib/index.cjs7.js +0 -1
- package/lib/index.es7.js +0 -24
- package/lib/vue.runtime.esm-bundler.cjs.js +0 -8
- package/lib/vue.runtime.esm-bundler.cjs.js.gz +0 -0
- package/lib/vue.runtime.esm-bundler.es.js +0 -4581
- package/lib/vue.runtime.esm-bundler.es.js.gz +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare enum PositionEnum {
|
|
2
|
+
/** 左上 */
|
|
3
|
+
LT = "left-top",
|
|
4
|
+
/** 右上 */
|
|
5
|
+
RT = "right-top",
|
|
6
|
+
/** 左下 */
|
|
7
|
+
LB = "left-bottom",
|
|
8
|
+
/** 右下 */
|
|
9
|
+
RB = "right-bottom"
|
|
10
|
+
}
|
|
11
|
+
export interface DataType {
|
|
12
|
+
/** 初始状态 */
|
|
13
|
+
status: boolean;
|
|
14
|
+
/** 容器Dom */
|
|
15
|
+
wrapDom?: HTMLElement | null;
|
|
16
|
+
/** 面板dom */
|
|
17
|
+
panelDom?: HTMLElement | null;
|
|
18
|
+
/** 悬浮球dom */
|
|
19
|
+
toolDom?: HTMLElement | null;
|
|
20
|
+
/** 悬浮球位置属性 */
|
|
21
|
+
toolPos?: DOMRect;
|
|
22
|
+
/** 面板位置属性 */
|
|
23
|
+
panelPos?: DOMRect;
|
|
24
|
+
panelWidth?: number;
|
|
25
|
+
panelHeight?: number;
|
|
26
|
+
mousePoint?: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** 初始数据 */
|
|
32
|
+
export declare const initData: DataType;
|
|
33
|
+
declare const _default: {
|
|
34
|
+
data(): DataType;
|
|
35
|
+
mounted(): void;
|
|
36
|
+
computed: {
|
|
37
|
+
panelWidthPX(): any;
|
|
38
|
+
panelHeightPX(): any;
|
|
39
|
+
};
|
|
40
|
+
methods: {
|
|
41
|
+
/** 获取所有的dom */
|
|
42
|
+
getAllDom(): void;
|
|
43
|
+
/** 加入移动元素方法 */
|
|
44
|
+
move(): void;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export default _default;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Update } from "./index.vue";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface UpdateProps {
|
|
2
|
+
title: String;
|
|
3
|
+
description: String;
|
|
4
|
+
content: Object;
|
|
5
|
+
time: String;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<UpdateProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<UpdateProps>>>, {}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
11
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
12
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
13
|
+
} : {
|
|
14
|
+
type: import('vue').PropType<T[K]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const YxTable: import("vue").DefineComponent<{
|
|
2
|
+
tableData: {
|
|
3
|
+
type: import("vue").PropType<any[]>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
rowKey: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
columns: {
|
|
11
|
+
type: import("vue").PropType<import("./type").TableColumn[]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
pageInfo: {
|
|
15
|
+
type: import("vue").PropType<import("./type").PageInfo>;
|
|
16
|
+
};
|
|
17
|
+
searchFormConfig: {
|
|
18
|
+
type: import("vue").PropType<import("./type").FormConfig[]>;
|
|
19
|
+
};
|
|
20
|
+
searchParams: {
|
|
21
|
+
type: import("vue").PropType<{
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
sort: {
|
|
26
|
+
type: import("vue").PropType<boolean>;
|
|
27
|
+
};
|
|
28
|
+
sortHandle: {
|
|
29
|
+
type: import("vue").PropType<string>;
|
|
30
|
+
};
|
|
31
|
+
load: {
|
|
32
|
+
type: import("vue").PropType<Function>;
|
|
33
|
+
};
|
|
34
|
+
}, {
|
|
35
|
+
tableRef: import("vue").Ref<any>;
|
|
36
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
"operate-handle": (type: string, data: object) => void;
|
|
38
|
+
"sort-end": (oldIndex: number, newIndex: number) => void;
|
|
39
|
+
"update-page": (type: string, value: number) => void;
|
|
40
|
+
"size-change": (type: string, value: number) => void;
|
|
41
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
42
|
+
tableData: {
|
|
43
|
+
type: import("vue").PropType<any[]>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
rowKey: {
|
|
47
|
+
type: import("vue").PropType<string>;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
columns: {
|
|
51
|
+
type: import("vue").PropType<import("./type").TableColumn[]>;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
pageInfo: {
|
|
55
|
+
type: import("vue").PropType<import("./type").PageInfo>;
|
|
56
|
+
};
|
|
57
|
+
searchFormConfig: {
|
|
58
|
+
type: import("vue").PropType<import("./type").FormConfig[]>;
|
|
59
|
+
};
|
|
60
|
+
searchParams: {
|
|
61
|
+
type: import("vue").PropType<{
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
sort: {
|
|
66
|
+
type: import("vue").PropType<boolean>;
|
|
67
|
+
};
|
|
68
|
+
sortHandle: {
|
|
69
|
+
type: import("vue").PropType<string>;
|
|
70
|
+
};
|
|
71
|
+
load: {
|
|
72
|
+
type: import("vue").PropType<Function>;
|
|
73
|
+
};
|
|
74
|
+
}>> & {
|
|
75
|
+
"onOperate-handle"?: ((type: string, data: object) => any) | undefined;
|
|
76
|
+
"onSort-end"?: ((oldIndex: number, newIndex: number) => any) | undefined;
|
|
77
|
+
"onUpdate-page"?: ((type: string, value: number) => any) | undefined;
|
|
78
|
+
"onSize-change"?: ((type: string, value: number) => any) | undefined;
|
|
79
|
+
}, {}, {}>;
|
|
80
|
+
export * from "./type";
|
|
81
|
+
export * from "./index.vue";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TableProps } from "./type.ts";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<TableProps>, {
|
|
3
|
+
tableRef: import("vue").Ref<any>;
|
|
4
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"operate-handle": (type: string, data: object) => void;
|
|
6
|
+
"sort-end": (oldIndex: number, newIndex: number) => void;
|
|
7
|
+
"update-page": (type: string, value: number) => void;
|
|
8
|
+
"size-change": (type: string, value: number) => void;
|
|
9
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TableProps>>> & {
|
|
10
|
+
"onOperate-handle"?: ((type: string, data: object) => any) | undefined;
|
|
11
|
+
"onSort-end"?: ((oldIndex: number, newIndex: number) => any) | undefined;
|
|
12
|
+
"onUpdate-page"?: ((type: string, value: number) => any) | undefined;
|
|
13
|
+
"onSize-change"?: ((type: string, value: number) => any) | undefined;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: import('vue').PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type YxTable from "./index.vue";
|
|
2
|
+
export type YxTableInstance = InstanceType<typeof YxTable>;
|
|
3
|
+
export interface TableProps {
|
|
4
|
+
tableData: any[];
|
|
5
|
+
rowKey: string;
|
|
6
|
+
columns: TableColumn[];
|
|
7
|
+
pageInfo?: PageInfo;
|
|
8
|
+
/**对齐方式 */
|
|
9
|
+
searchFormConfig?: FormConfig[];
|
|
10
|
+
searchParams?: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
/**是否开启拖拽 */
|
|
14
|
+
sort?: boolean;
|
|
15
|
+
sortHandle?: string;
|
|
16
|
+
load?: Function;
|
|
17
|
+
}
|
|
18
|
+
export interface FormConfig {
|
|
19
|
+
label: string;
|
|
20
|
+
type: string;
|
|
21
|
+
key?: string;
|
|
22
|
+
options?: Array<{
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}> | Function;
|
|
25
|
+
width?: number;
|
|
26
|
+
componentWidth?: string;
|
|
27
|
+
dateType?: string;
|
|
28
|
+
inputType?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
clearable?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface PageInfo {
|
|
33
|
+
size: number;
|
|
34
|
+
current: number;
|
|
35
|
+
total: number;
|
|
36
|
+
}
|
|
37
|
+
export interface Operate {
|
|
38
|
+
/**操作栏label */
|
|
39
|
+
label: string;
|
|
40
|
+
/**操作栏对应点击事件的key */
|
|
41
|
+
key: string;
|
|
42
|
+
/**操作栏自定义触发的点击事件,不配置则默认通知上面的key自行处理 */
|
|
43
|
+
onClick?: (row: any) => void;
|
|
44
|
+
/**控制操作栏显示或隐藏的方法 */
|
|
45
|
+
show?: (row: any) => boolean;
|
|
46
|
+
/**自定义render方法 */
|
|
47
|
+
render?: (scope: any) => any;
|
|
48
|
+
}
|
|
49
|
+
export interface TableColumn {
|
|
50
|
+
/** 列的名字 */
|
|
51
|
+
label?: string;
|
|
52
|
+
/** 对应数据的key */
|
|
53
|
+
prop?: string;
|
|
54
|
+
/** 宽度 */
|
|
55
|
+
width?: number;
|
|
56
|
+
/** 列的类型 */
|
|
57
|
+
type?: "index" | "selection" | "expand";
|
|
58
|
+
/** 渲染类型 */
|
|
59
|
+
renderType?: string;
|
|
60
|
+
/**自定义render方法 */
|
|
61
|
+
render?: (scope: any) => any;
|
|
62
|
+
/** 操作栏 */
|
|
63
|
+
operate?: Operate[];
|
|
64
|
+
/** 固定栏 */
|
|
65
|
+
fixed?: string;
|
|
66
|
+
/** 对数据进行格式化 */
|
|
67
|
+
formatter?: Function;
|
|
68
|
+
/** 插槽名称 */
|
|
69
|
+
slotName?: string;
|
|
70
|
+
/** 动态组件配置 */
|
|
71
|
+
config?: Record<string, any>;
|
|
72
|
+
/** 动态组修改回调 */
|
|
73
|
+
change?: (row: any) => void;
|
|
74
|
+
/**多级表头 */
|
|
75
|
+
children?: TableColumn[];
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as YxTable3 } from "./src/index.tsx";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { PropType } from "vue";
|
|
2
|
+
import type { TableProps } from "./interface/index.d";
|
|
3
|
+
declare const yxTableEmits: {
|
|
4
|
+
"operate-handle": (key: string, row: object) => boolean;
|
|
5
|
+
"sort-end": (oldIndex: number, newIndex: number) => boolean;
|
|
6
|
+
"update-page": (type: string, value: number) => boolean;
|
|
7
|
+
"size-change": () => boolean;
|
|
8
|
+
};
|
|
9
|
+
export type yxTableEmits = typeof yxTableEmits;
|
|
10
|
+
declare const _default: import("vue").DefineComponent<{
|
|
11
|
+
tableProps: {
|
|
12
|
+
type: PropType<TableProps>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"operate-handle": (key: string, row: object) => boolean;
|
|
17
|
+
"sort-end": (oldIndex: number, newIndex: number) => boolean;
|
|
18
|
+
"update-page": (type: string, value: number) => boolean;
|
|
19
|
+
"size-change": () => boolean;
|
|
20
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
tableProps: {
|
|
22
|
+
type: PropType<TableProps>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
}>> & {
|
|
26
|
+
"onOperate-handle"?: ((key: string, row: object) => any) | undefined;
|
|
27
|
+
"onSort-end"?: ((oldIndex: number, newIndex: number) => any) | undefined;
|
|
28
|
+
"onUpdate-page"?: ((type: string, value: number) => any) | undefined;
|
|
29
|
+
"onSize-change"?: (() => any) | undefined;
|
|
30
|
+
}, {}, {}>;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./YxTable/type";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as utils from "./utils";
|
|
2
|
+
export * as icons from "./icons";
|
|
3
|
+
export * as api from "./api";
|
|
4
|
+
export * as theme from "./theme";
|
|
5
|
+
export * as components from "./components";
|
|
6
|
+
export * from "./directives";
|
|
7
|
+
export declare const BC: BroadcastChannel;
|
|
8
|
+
export * from "./components/type";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ttcFontFamily: string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
interface ThemeDTO {
|
|
2
|
+
id: number;
|
|
3
|
+
defaultTheme: number;
|
|
4
|
+
theme: string;
|
|
5
|
+
themeUrl: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @description:注册主题下的css变量
|
|
9
|
+
*/
|
|
10
|
+
export declare const install: (isRenderToolbar?: boolean) => Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* @description:修改主题
|
|
13
|
+
* @param theme 主题
|
|
14
|
+
*/
|
|
15
|
+
export declare const changeTheme: (theme: ThemeDTO) => Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* @description:更新主题
|
|
18
|
+
*/
|
|
19
|
+
export declare const updateTheme: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* @description:获取默认主题URl
|
|
22
|
+
*/
|
|
23
|
+
export declare const getDefaultThemeUrl: () => Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* @description:获取当前主题
|
|
26
|
+
*/
|
|
27
|
+
export declare const getCurTheme: () => any;
|
|
28
|
+
/**
|
|
29
|
+
* @description:获取当前主题变量
|
|
30
|
+
*/
|
|
31
|
+
export declare const getCurThemeCssVar: () => any;
|
|
32
|
+
/**
|
|
33
|
+
* @description:获取当前主题下的某个组/模块配置颜色
|
|
34
|
+
* @param groupName 名称
|
|
35
|
+
*/
|
|
36
|
+
export declare const getGroupColor: (groupName: string) => object;
|
|
37
|
+
export {};
|
|
38
|
+
/**
|
|
39
|
+
* @description:注册当前系统私有css变量
|
|
40
|
+
* @param systemName 系统名称
|
|
41
|
+
*/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 给各分系统发送消息
|
|
3
|
+
* @param data 发送的消息
|
|
4
|
+
*/
|
|
5
|
+
interface Message {
|
|
6
|
+
type: string;
|
|
7
|
+
data: any;
|
|
8
|
+
}
|
|
9
|
+
export declare const notifyMessageToSystems: (message: Message) => void;
|
|
10
|
+
/**
|
|
11
|
+
* @description 接收系统消息
|
|
12
|
+
* @param callback 接收后的回调
|
|
13
|
+
*/
|
|
14
|
+
export declare const receiveMessage: (callback: Function) => void;
|
|
15
|
+
/**
|
|
16
|
+
* @param arr 处理的参数
|
|
17
|
+
* @param labelKey label的key
|
|
18
|
+
* @param valueKey value的key
|
|
19
|
+
* @param isValueToNumber 是否将value转为number
|
|
20
|
+
* @return [{label:"",value:""}]
|
|
21
|
+
*/
|
|
22
|
+
export declare const getSelectOptions: (arr: [], labelKey: string, valueKey: string, isValueToNumber?: boolean) => {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string | number;
|
|
25
|
+
}[];
|
|
26
|
+
/**
|
|
27
|
+
* @param enumObject 处理的枚举类
|
|
28
|
+
*/
|
|
29
|
+
export declare const enumToArray: <T extends Record<string, string | number>>(enumObject: T) => {
|
|
30
|
+
label: string;
|
|
31
|
+
value: string | number;
|
|
32
|
+
}[];
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { App, Plugin } from "vue";
|
|
2
|
+
export type SFCWithInstall<T> = T & Plugin;
|
|
3
|
+
export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E | undefined) => SFCWithInstall<T> & E;
|
|
4
|
+
export declare const makeInstaller: (components?: Plugin[]) => {
|
|
5
|
+
install: (app: App) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const showFullScreenLoading: () => void;
|
|
2
|
+
/**
|
|
3
|
+
* @description 隐藏全屏加载
|
|
4
|
+
* */
|
|
5
|
+
export declare const hideFullScreenLoading: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* @description:请求配置
|
|
8
|
+
*/
|
|
9
|
+
export declare enum ResultEnum {
|
|
10
|
+
SUCCESS = 200,
|
|
11
|
+
ERROR = 500,
|
|
12
|
+
OVERDUE = 401,
|
|
13
|
+
TIMEOUT = 30000
|
|
14
|
+
}
|
|
15
|
+
export declare const config: {
|
|
16
|
+
timeout: number;
|
|
17
|
+
withCredentials: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @description: 校验网络请求状态码
|
|
21
|
+
* @param {Number} status
|
|
22
|
+
* @return void
|
|
23
|
+
*/
|
|
24
|
+
export declare const checkStatus: (status: number, msg?: string) => void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AxiosInstance, AxiosRequestConfig } from "axios";
|
|
2
|
+
declare class YxHttp {
|
|
3
|
+
service: AxiosInstance;
|
|
4
|
+
constructor(config: AxiosRequestConfig);
|
|
5
|
+
private setupInterceptors;
|
|
6
|
+
private handleOverdueResponse;
|
|
7
|
+
private handleErrorResponse;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param url
|
|
11
|
+
* @param params
|
|
12
|
+
* @param options : AxiosRequestConfig
|
|
13
|
+
* @description get 请求
|
|
14
|
+
*/
|
|
15
|
+
get<T = any>(url: string, params?: object, options?: AxiosRequestConfig): Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param url
|
|
19
|
+
* @param params
|
|
20
|
+
* @param options : AxiosRequestConfig
|
|
21
|
+
* @description post 请求
|
|
22
|
+
*/
|
|
23
|
+
post<T = any>(url: string, params?: object, options?: AxiosRequestConfig): Promise<T>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param url
|
|
27
|
+
* @param params
|
|
28
|
+
* @param options : AxiosRequestConfig
|
|
29
|
+
*/
|
|
30
|
+
put<T = any>(url: string, params?: object, options?: AxiosRequestConfig): Promise<T>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param url
|
|
34
|
+
* @param params
|
|
35
|
+
* @param options : AxiosRequestConfig
|
|
36
|
+
*/
|
|
37
|
+
delete<T = any>(url: string, params?: any, options?: AxiosRequestConfig): Promise<T>;
|
|
38
|
+
}
|
|
39
|
+
declare const _default: YxHttp;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Message {
|
|
2
|
+
type: string;
|
|
3
|
+
data: any;
|
|
4
|
+
}
|
|
5
|
+
declare class YxSubscribe {
|
|
6
|
+
private subscribers;
|
|
7
|
+
constructor();
|
|
8
|
+
subscribe(sub: string, fn: Function): void;
|
|
9
|
+
unsubscribe(sub: string, fn?: Function): never[] | undefined;
|
|
10
|
+
publish(message: Message): void;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: YxSubscribe;
|
|
13
|
+
export default _default;
|
package/lib/index.cjs7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./index.cjs6.js"),s={mounted(t,e){n(t,e)}},n=(t,e)=>{const c=e.value;return i.getUserIsHaveBtnPower(c)?"":t.remove()},r={auth:s},o={install:function(t){Object.keys(r).forEach(e=>{t.directive(e,r[e])})}},u=Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"}));exports.directives=u;exports.directives$1=o;
|
package/lib/index.es7.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { B as s } from "./index.es6.js";
|
|
2
|
-
const c = {
|
|
3
|
-
mounted(t, e) {
|
|
4
|
-
n(t, e);
|
|
5
|
-
}
|
|
6
|
-
}, n = (t, e) => {
|
|
7
|
-
const r = e.value;
|
|
8
|
-
return s(r) ? "" : t.remove();
|
|
9
|
-
}, o = {
|
|
10
|
-
auth: c
|
|
11
|
-
}, i = {
|
|
12
|
-
install: function(t) {
|
|
13
|
-
Object.keys(o).forEach((e) => {
|
|
14
|
-
t.directive(e, o[e]);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}, l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18
|
-
__proto__: null,
|
|
19
|
-
default: i
|
|
20
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
21
|
-
export {
|
|
22
|
-
i as a,
|
|
23
|
-
l as d
|
|
24
|
-
};
|