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.
@@ -28,6 +28,7 @@ export interface IField<T> {
28
28
  type IFilterRenderProps<T> = {
29
29
  h: IRender
30
30
  data: T
31
+ modelValue?: any
31
32
  }
32
33
 
33
34
  export interface IFilterProps<T> {
@@ -1,9 +1,5 @@
1
- export declare const urlPre: string;
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,2 @@
1
+ import { Directive } from 'vue';
2
+ export declare const card: Directive;
@@ -0,0 +1,2 @@
1
+ export * from './sticky';
2
+ export * from './card';
@@ -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,2 @@
1
+ export * from './useFetch';
2
+ export * from './useTable/index';
@@ -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 {};
@@ -0,0 +1,3 @@
1
+ import { FetchOptions } from '../useFetch';
2
+ import { IExtra, TableReturn } from './type';
3
+ export declare function useComTable<T = any>(url: string, options: FetchOptions<T> & IExtra): TableReturn<T>;
@@ -0,0 +1,4 @@
1
+ import { FetchOptions } from '../useFetch';
2
+ import { IExtra, TableReturn } from './type';
3
+ /** 通用模板 */
4
+ export declare function useDefaultTable<T = any>(url: string, options: FetchOptions<T> & IExtra): TableReturn<T>;
@@ -0,0 +1,3 @@
1
+ import { TableReturn, IExtra } from './type';
2
+ import { FetchOptions } from '../useFetch';
3
+ export declare function useTable<T = any>(url: string, options: FetchOptions<T> & IExtra): TableReturn<T>;
@@ -147,7 +147,7 @@
147
147
  }
148
148
  }
149
149
 
150
- .staff-tree[data-v-7ec618a3] {
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-7ec618a3] {
158
+ .staff-select-trigger[data-v-5c901fff] {
159
159
  width: 100%;
160
160
  cursor: pointer;
161
161
  }
162
- .staff-select-trigger[data-v-7ec618a3] .el-select {
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-7ec618a3] {
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-7ec618a3]:hover {
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-7ec618a3] .el-select__wrapper {
179
+ &[data-v-5c901fff] .el-select__wrapper {
180
180
  border: 1px solid red;
181
181
  }
182
182
  }
@@ -0,0 +1,5 @@
1
+ export declare const urlPre: string;
2
+ /** 去重数组(基于 SameValueZero 比较)*/
3
+ export declare function uniq<T>(arr: T[]): T[];
4
+ /** 根据指定 key 去重数组 */
5
+ export declare function uniqBy<T>(arr: T[], key: keyof T | ((item: T) => unknown)): T[];
@@ -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;