Skip to content

Commit ad7e15a

Browse files
committed
update types
1 parent 233c5c1 commit ad7e15a

File tree

7 files changed

+70
-14
lines changed

7 files changed

+70
-14
lines changed

types/cascader.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ export declare class Cascader {
6060
'not-found-text': string;
6161

6262
/**
63-
* 是否将弹层放置于 body 内,在 Tabs、带有 fixed 的 Table
64-
列内使用时,建议添加此属性,它将不受父级样式影响,从而达到更好的效果
63+
* 是否将弹层放置于 body 内,在 Tabs、带有 fixed 的 Table 列内使用时,建议添加此属性,它将不受父级样式影响,从而达到更好的效果
6564
*/
6665
transfer: boolean;
6766

types/image.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export declare class Image {
7474
*/
7575
'initial-index': number;
7676

77+
/**
78+
* 图片预览操作栏选项,按数组顺序排序
79+
*/
80+
toolbar: [];
81+
7782
/**
7883
* 图片加载成功
7984
*/
@@ -149,6 +154,11 @@ export declare class ImagePreview {
149154
*/
150155
transfer: boolean;
151156

157+
/**
158+
* 操作栏选项,按数组顺序排序
159+
*/
160+
toolbar: [];
161+
152162
/**
153163
* 图片预览切换
154164
*/

types/index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ interface ViewUIPlusGlobalOptions {
5656
modal: {
5757
maskClosable: boolean | string;
5858
};
59+
typography: {
60+
copyConfig: object;
61+
editConfig: object;
62+
ellipsisConfig: object;
63+
};
64+
space: {
65+
size: string | number | [];
66+
};
5967
}
6068

6169
interface ViewUIPlusInstallOptions extends ViewUIPlusGlobalOptions{

types/space.d.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
export declare class Space {
2+
/**
3+
* 间距大小,当类型为 `String` 时,可选值有:`small`、`large`、`default`
4+
*/
5+
size: 'small' | 'large' | 'default' | number | [];
6+
7+
/**
8+
* 布局方向,可选值有:`horizontal`、`vertical`
9+
*/
10+
direction: 'horizontal' | 'vertical';
11+
12+
/**
13+
* 对齐方式,可选值有:`start`、`end`、`center`、`baseline`、`stretch`
14+
*/
15+
align: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
16+
17+
/**
18+
* 是否自动换行
19+
*/
20+
wrap: boolean;
21+
22+
/**
23+
* 是否显示分隔符,值为 true 时显示默认的分隔符
24+
*/
25+
split: boolean;
26+
27+
/**
28+
* Flex 布局类型,可选值有:`inline-flex`、`flex`,值为 `flex` 时,`align` 的默认值为 `stretch`
29+
*/
30+
type: 'inline-flex' | 'flex';
31+
32+
$slots: {
33+
/**
34+
* 需要添加间距的元素
35+
*/
36+
default: [];
37+
38+
/**
39+
* 自定义分隔符
40+
*/
41+
split: [];
42+
43+
};
44+
}

types/table.d.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,12 @@ export declare class TableColumn {
320320
tooltipMaxWidth: number;
321321

322322
/**
323-
* 自定义渲染列,使用 Vue 的 Render 函数。传入两个参数,第一个是 h,第二个为对象,包含 row、column 和
324-
index,分别指当前行数据,当前列数据,当前行索引,详见示例。
323+
* 自定义渲染列,使用 Vue 的 Render 函数。传入两个参数,第一个是 h,第二个为对象,包含 row、column 和 index,分别指当前行数据,当前列数据,当前行索引,详见示例。
325324
*/
326325
render: Function;
327326

328327
/**
329-
* 自定义列头显示内容,使用 Vue 的 Render 函数。传入两个参数,第一个是 h,第二个为对象,包含 `column` 和
330-
`index`,分别为当前列数据和当前列索引。
328+
* 自定义列头显示内容,使用 Vue 的 Render 函数。传入两个参数,第一个是 h,第二个为对象,包含 `column` 和 `index`,分别为当前列数据和当前列索引。
331329
*/
332330
renderHeader: Function;
333331

@@ -342,8 +340,7 @@ export declare class TableColumn {
342340
sortable: boolean | 'custom';
343341

344342
/**
345-
* 自定义排序使用的方法,接收三个参数 a 、 b 和 type,当设置 `sortable: true` 时有效。type 值为 asc 和
346-
desc
343+
* 自定义排序使用的方法,接收三个参数 a 、 b 和 type,当设置 `sortable: true` 时有效。type 值为 asc 和 desc
347344
*/
348345
sortMethod: Function;
349346

@@ -393,8 +390,7 @@ export declare class TableColumn {
393390
tree: boolean;
394391

395392
/**
396-
* 使用 slot 自定义列时,列的渲染模式。可选值为 block、inline、inline-block,当使用树形数据时,建议使用 inline 或
397-
inline-block
393+
* 使用 slot 自定义列时,列的渲染模式。可选值为 block、inline、inline-block,当使用树形数据时,建议使用 inline 或 inline-block
398394
*/
399395
display: string;
400396

types/upload.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ export declare class Upload {
6060
accept: string;
6161

6262
/**
63-
* 支持的文件类型,与 accept 不同的是,format 是识别文件的后缀名,accept 为 input 标签原生的 accept
64-
属性,会在选择文件时过滤,可以两者结合使用
63+
* 支持的文件类型,与 accept 不同的是,format 是识别文件的后缀名,accept 为 input 标签原生的 accept 属性,会在选择文件时过滤,可以两者结合使用
6564
*/
6665
format: [];
6766

@@ -111,8 +110,7 @@ export declare class Upload {
111110
'on-exceeded-size': Function;
112111

113112
/**
114-
* 默认已上传的文件列表,例如:```[{name: 'img1.jpg', url: 'http://www.xxx.com/img1.jpg'},
115-
{name: 'img2.jpg', url: 'http://www.xxx.com/img2.jpg'}]```
113+
* 默认已上传的文件列表,例如:```[{name: 'img1.jpg', url: 'http://www.xxx.com/img1.jpg'}, {name: 'img2.jpg', url: 'http://www.xxx.com/img2.jpg'}]```
116114
*/
117115
'default-file-list': [];
118116

types/viewuiplus.components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export { Scroll } from './scroll'
5959
export { Select, Option, OptionGroup } from './select'
6060
export { Skeleton, SkeletonItem } from './skeleton'
6161
export { Slider } from './slider'
62+
export { Space } from './space'
6263
export { Spin } from './spin'
6364
export { Split } from './split'
6465
export { Steps, Step } from './steps'

0 commit comments

Comments
 (0)