yc-vep-ui 0.2.1 → 0.2.4
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/components/Filter/type.d.ts +1 -0
- package/dist/components/utils/index.d.ts +3 -7
- package/dist/directives/card/index.d.ts +2 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/sticky/index.d.ts +17 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useFetch.d.ts +37 -0
- package/dist/hooks/useTable/common.d.ts +3 -0
- package/dist/hooks/useTable/default.d.ts +4 -0
- package/dist/hooks/useTable/index.d.ts +3 -0
- package/dist/{yc-vep-ui.css → index.css} +6 -6
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/request.d.ts +9 -0
- package/dist/vep-ui.es.js +689 -444
- package/dist/vep-ui.umd.js +1 -1
- package/package.json +14 -10
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
/**
|
|
3
|
-
* 去重数组(基于 SameValueZero 比较)
|
|
4
|
-
*/
|
|
1
|
+
export declare const baseUrl: string;
|
|
2
|
+
/** 去重数组(基于 SameValueZero 比较)*/
|
|
5
3
|
export declare function uniq<T>(arr: T[]): T[];
|
|
6
|
-
/**
|
|
7
|
-
* 根据指定 key 去重数组
|
|
8
|
-
*/
|
|
4
|
+
/** 根据指定 key 去重数组 */
|
|
9
5
|
export declare function uniqBy<T>(arr: T[], key: keyof T | ((item: T) => unknown)): T[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Directive } from 'vue';
|
|
2
|
+
export interface StickyEl extends HTMLElement {
|
|
3
|
+
_stickyConfig: {
|
|
4
|
+
target: HTMLElement;
|
|
5
|
+
top: number;
|
|
6
|
+
};
|
|
7
|
+
_stickyOriginalStyles: {
|
|
8
|
+
position: string;
|
|
9
|
+
top: string;
|
|
10
|
+
zIndex: string;
|
|
11
|
+
width: string;
|
|
12
|
+
};
|
|
13
|
+
_stickyOffsetTop: number;
|
|
14
|
+
_stickyScrollListener: () => void;
|
|
15
|
+
}
|
|
16
|
+
/** 粘性定位指令 */
|
|
17
|
+
export declare const sticky: Directive;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
type Response<T = any> = any;
|
|
3
|
+
export interface FetchOptions<T> {
|
|
4
|
+
/** 是否立即执行请求 */
|
|
5
|
+
immediate?: boolean;
|
|
6
|
+
defaultParams?: Record<string, any>;
|
|
7
|
+
/** 手动控制请求触发 */
|
|
8
|
+
ready?: Ref<boolean> | boolean | any;
|
|
9
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
/** 请求参数 */
|
|
12
|
+
params?: Record<string, any>;
|
|
13
|
+
/** 请求前回调 */
|
|
14
|
+
onBefore?: (options: Record<string, any>) => boolean;
|
|
15
|
+
/** 成功回调 */
|
|
16
|
+
onSuccess?: (res: Response<T>) => void;
|
|
17
|
+
/** 错误回调 */
|
|
18
|
+
onError?: (err: Error) => void;
|
|
19
|
+
/** 请求完成回调 */
|
|
20
|
+
onFinally?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export interface UseFetchReturn<T> {
|
|
23
|
+
/** 手动触发请求 */
|
|
24
|
+
execute: () => Promise<T>;
|
|
25
|
+
/** 请求中状态 */
|
|
26
|
+
loading: Ref<boolean>;
|
|
27
|
+
/** 响应数据 */
|
|
28
|
+
data: Ref<T | null>;
|
|
29
|
+
/** 错误信息 */
|
|
30
|
+
error: Ref<Error | null>;
|
|
31
|
+
/** 设置请求参数 */
|
|
32
|
+
setParams: (params: Record<string, any>) => void;
|
|
33
|
+
/** 请求参数 */
|
|
34
|
+
params: Ref<Record<string, any>>;
|
|
35
|
+
}
|
|
36
|
+
export declare function useFetch<T = any>(url: string, options?: FetchOptions<T>): UseFetchReturn<T>;
|
|
37
|
+
export {};
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.staff-tree[data-v-
|
|
150
|
+
.staff-tree[data-v-5c901fff] {
|
|
151
151
|
position: relative;
|
|
152
152
|
height: 90%;
|
|
153
153
|
overflow-y: auto;
|
|
@@ -155,28 +155,28 @@
|
|
|
155
155
|
border-radius: 4px;
|
|
156
156
|
margin-top: 8px;
|
|
157
157
|
}
|
|
158
|
-
.staff-select-trigger[data-v-
|
|
158
|
+
.staff-select-trigger[data-v-5c901fff] {
|
|
159
159
|
width: 100%;
|
|
160
160
|
cursor: pointer;
|
|
161
161
|
}
|
|
162
|
-
.staff-select-trigger[data-v-
|
|
162
|
+
.staff-select-trigger[data-v-5c901fff] .el-select {
|
|
163
163
|
width: 100%;
|
|
164
164
|
pointer-events: none;
|
|
165
165
|
}
|
|
166
166
|
.staff-item {
|
|
167
|
-
&[data-v-
|
|
167
|
+
&[data-v-5c901fff] {
|
|
168
168
|
line-height: 28px;
|
|
169
169
|
padding: 0% 20px 0% 10px;
|
|
170
170
|
display: flex;
|
|
171
171
|
justify-content: space-between;
|
|
172
172
|
align-items: center;
|
|
173
173
|
}
|
|
174
|
-
&[data-v-
|
|
174
|
+
&[data-v-5c901fff]:hover {
|
|
175
175
|
background-color: rgba(102, 177, 255, 0.5);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
.is-required {
|
|
179
|
-
&[data-v-
|
|
179
|
+
&[data-v-5c901fff] .el-select__wrapper {
|
|
180
180
|
border: 1px solid red;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare function get(url: string, params?: Record<string, any>): Promise<any>;
|
|
2
|
+
declare function post(url: string, body: any): Promise<any>;
|
|
3
|
+
declare function blob(url: string, body: any): Promise<Blob>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
get: typeof get;
|
|
6
|
+
post: typeof post;
|
|
7
|
+
blob: typeof blob;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|