@ttkj/avue 2.11.5 → 2.11.7
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/avue.js +18 -18
- package/lib/avue.min.js +4 -4
- package/lib/index.css +1 -1
- package/package.json +2 -2
- package/types/avue.d.ts +4 -4
- package/types/form/column.d.ts +20 -20
- package/types/global-component/dialog-form.d.ts +65 -2
- package/types/global-component/image-preview.d.ts +4 -4
- package/types/global.d.ts +8 -7
- package/types/variable.d.ts +1 -1
@@ -29,10 +29,10 @@ export interface ImagePreviewData {
|
|
29
29
|
export interface ImagePreviewFn {
|
30
30
|
(
|
31
31
|
/** 图片数组 */
|
32
|
-
data
|
32
|
+
data?: ImagePreviewData[],
|
33
33
|
/** 默认打开序号 */
|
34
|
-
index
|
35
|
-
ops
|
34
|
+
index?: number,
|
35
|
+
ops?: Partial<{
|
36
36
|
/**
|
37
37
|
* 点击modal时是否关闭
|
38
38
|
* @default false
|
@@ -47,6 +47,6 @@ export interface ImagePreviewFn {
|
|
47
47
|
* @default true
|
48
48
|
*/
|
49
49
|
modal: boolean;
|
50
|
-
}>
|
50
|
+
}>
|
51
51
|
): ImagePreview;
|
52
52
|
}
|
package/types/global.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import Vue from 'vue';
|
2
2
|
import { ButtonType } from 'element-ui/types/button';
|
3
3
|
|
4
|
+
import { DicProps } from './variable';
|
4
5
|
import { DialogFormPlugin } from './global-component/dialog-form';
|
5
6
|
import { CropperImage, ImageCropperOption } from './global-component/image-cropper';
|
6
7
|
import { ImagePreviewFn } from './global-component/image-preview';
|
@@ -112,7 +113,7 @@ declare module 'vue/types/vue' {
|
|
112
113
|
/** 查找的关键词 */
|
113
114
|
value: string,
|
114
115
|
/** 关键词对应的属性名 */
|
115
|
-
key
|
116
|
+
key?: string
|
116
117
|
) => T;
|
117
118
|
/**
|
118
119
|
* 打印
|
@@ -153,7 +154,7 @@ declare module 'vue/types/vue' {
|
|
153
154
|
* 加载外部链接
|
154
155
|
* @param type 链接类型,可选值为css和js
|
155
156
|
*/
|
156
|
-
loadScript: (type: 'css' | 'js', url: string) => Promise
|
157
|
+
loadScript: (type: 'css' | 'js', url: string) => Promise<void>;
|
157
158
|
/** 对象深拷贝 */
|
158
159
|
deepClone: <T extends Obj | Obj[]>(data: T) => T;
|
159
160
|
/**
|
@@ -161,7 +162,7 @@ declare module 'vue/types/vue' {
|
|
161
162
|
* @param num css像素,数字默认加px属性
|
162
163
|
* @param defaultValue 默认值,当num为空时生效
|
163
164
|
*/
|
164
|
-
setPx: (num: unknown, defaultValue
|
165
|
+
setPx: (num: unknown, defaultValue?: string) => string;
|
165
166
|
/**
|
166
167
|
* 判断对象、数组、字符串是否为空
|
167
168
|
*/
|
@@ -172,13 +173,13 @@ declare module 'vue/types/vue' {
|
|
172
173
|
* @param value 数组项对象的某个属性值
|
173
174
|
* @param key 数组项对象的属性名,默认为value
|
174
175
|
*/
|
175
|
-
findArray: (arr: Obj[], value: any, key
|
176
|
+
findArray: (arr: Obj[], value: any, key?: string) => number;
|
176
177
|
/**
|
177
178
|
* 判断是否包含权限
|
178
179
|
* @param valid 是否包含权限
|
179
180
|
* @param defaultValid 默认是否包含
|
180
181
|
*/
|
181
|
-
vaildData: <T = boolean>(valid?: T, defaultValid
|
182
|
+
vaildData: <T = boolean>(valid?: T, defaultValid?: boolean) => boolean;
|
182
183
|
/**
|
183
184
|
* 将表单项所层列表转换为一层列
|
184
185
|
* @since 2.10.10
|
@@ -204,7 +205,7 @@ declare module 'vue/types/vue' {
|
|
204
205
|
* @param info 信息
|
205
206
|
* @param type style
|
206
207
|
*/
|
207
|
-
capsule: (title: string, info: string, type
|
208
|
+
capsule: (title: string, info: string, type?: LogType) => void;
|
208
209
|
/**
|
209
210
|
* 打印彩色文字
|
210
211
|
*/
|
@@ -213,7 +214,7 @@ declare module 'vue/types/vue' {
|
|
213
214
|
/** 日志内容 */
|
214
215
|
text: string;
|
215
216
|
/** 日志类型 */
|
216
|
-
type
|
217
|
+
type?: LogType;
|
217
218
|
}[]
|
218
219
|
) => void;
|
219
220
|
/**
|
package/types/variable.d.ts
CHANGED
@@ -52,7 +52,7 @@ export namespace Variable {
|
|
52
52
|
/** 时间单选类组件类型 */
|
53
53
|
export const SINGLE_DATE_LIST: string;
|
54
54
|
/** 时间区间类组件类型 */
|
55
|
-
export const DATE_ARRAY_LIST
|
55
|
+
export const DATE_ARRAY_LIST: string;
|
56
56
|
/** 时间类组件类型 */
|
57
57
|
export const DATE_LIST: string;
|
58
58
|
/** 含子组件的带值组件类型 */
|