ngx-formly-zorro-antd 14.3.0 → 14.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/autocomplete/autocomplete.props.d.ts +38 -38
- package/autocomplete/index.d.ts +5 -5
- package/autocomplete/public_api.d.ts +1 -1
- package/button/button.module.d.ts +11 -11
- package/button/button.type.d.ts +66 -66
- package/button/index.d.ts +5 -5
- package/button/public_api.d.ts +2 -2
- package/card/card.module.d.ts +10 -10
- package/card/card.wrapper.d.ts +58 -58
- package/card/index.d.ts +5 -5
- package/card/public_api.d.ts +2 -2
- package/cascader/cascader.module.d.ts +12 -12
- package/cascader/cascader.type.d.ts +152 -152
- package/cascader/index.d.ts +5 -5
- package/cascader/public_api.d.ts +2 -2
- package/checkbox/checkbox.module.d.ts +12 -12
- package/checkbox/checkbox.type.d.ts +35 -35
- package/checkbox/index.d.ts +5 -5
- package/checkbox/public_api.d.ts +2 -2
- package/datepicker/datepicker.module.d.ts +12 -12
- package/datepicker/datepicker.props.d.ts +149 -149
- package/datepicker/datepicker.type.d.ts +32 -32
- package/datepicker/index.d.ts +5 -5
- package/datepicker/public_api.d.ts +2 -2
- package/esm2020/autocomplete/autocomplete.props.mjs +2 -2
- package/esm2020/autocomplete/ngx-formly-zorro-antd-autocomplete.mjs +4 -4
- package/esm2020/autocomplete/public_api.mjs +2 -2
- package/esm2020/button/button.module.mjs +61 -61
- package/esm2020/button/button.type.mjs +110 -110
- package/esm2020/button/ngx-formly-zorro-antd-button.mjs +4 -4
- package/esm2020/button/public_api.mjs +3 -3
- package/esm2020/card/card.module.mjs +43 -43
- package/esm2020/card/card.wrapper.mjs +47 -47
- package/esm2020/card/ngx-formly-zorro-antd-card.mjs +4 -4
- package/esm2020/card/public_api.mjs +3 -3
- package/esm2020/cascader/cascader.module.mjs +51 -51
- package/esm2020/cascader/cascader.type.mjs +112 -112
- package/esm2020/cascader/ngx-formly-zorro-antd-cascader.mjs +4 -4
- package/esm2020/cascader/public_api.mjs +3 -3
- package/esm2020/checkbox/checkbox.module.mjs +59 -59
- package/esm2020/checkbox/checkbox.type.mjs +69 -69
- package/esm2020/checkbox/ngx-formly-zorro-antd-checkbox.mjs +4 -4
- package/esm2020/checkbox/public_api.mjs +3 -3
- package/esm2020/datepicker/datepicker.module.mjs +51 -51
- package/esm2020/datepicker/datepicker.props.mjs +2 -2
- package/esm2020/datepicker/datepicker.type.mjs +196 -196
- package/esm2020/datepicker/ngx-formly-zorro-antd-datepicker.mjs +4 -4
- package/esm2020/datepicker/public_api.mjs +3 -3
- package/esm2020/form-field/form-field.module.mjs +45 -45
- package/esm2020/form-field/form-field.props.mjs +2 -2
- package/esm2020/form-field/form-field.wrapper.mjs +127 -127
- package/esm2020/form-field/ngx-formly-zorro-antd-form-field.mjs +4 -4
- package/esm2020/form-field/public_api.mjs +2 -2
- package/esm2020/grid/grid.module.mjs +41 -41
- package/esm2020/grid/grid.props.mjs +2 -2
- package/esm2020/grid/grid.type.mjs +71 -71
- package/esm2020/grid/ngx-formly-zorro-antd-grid.mjs +4 -4
- package/esm2020/grid/public_api.mjs +3 -3
- package/esm2020/index.mjs +2 -2
- package/esm2020/input/input.module.mjs +89 -89
- package/esm2020/input/input.props.mjs +2 -2
- package/esm2020/input/input.type.mjs +309 -309
- package/esm2020/input/ngx-formly-zorro-antd-input.mjs +4 -4
- package/esm2020/input/public_api.mjs +3 -3
- package/esm2020/input-group/input-group.module.mjs +47 -47
- package/esm2020/input-group/input-group.props.mjs +2 -2
- package/esm2020/input-group/input-group.type.mjs +71 -71
- package/esm2020/input-group/ngx-formly-zorro-antd-input-group.mjs +4 -4
- package/esm2020/input-group/public_api.mjs +3 -3
- package/esm2020/input-number/input-number.module.mjs +59 -59
- package/esm2020/input-number/input-number.props.mjs +2 -2
- package/esm2020/input-number/input-number.type.mjs +128 -128
- package/esm2020/input-number/ngx-formly-zorro-antd-input-number.mjs +4 -4
- package/esm2020/input-number/public_api.mjs +3 -3
- package/esm2020/lib/ui-ng-zorro-antd.mjs +2 -2
- package/esm2020/lib/ui-ng-zorro-antd.module.mjs +97 -97
- package/esm2020/ngx-formly-zorro-antd.mjs +4 -4
- package/esm2020/radio/ngx-formly-zorro-antd-radio.mjs +4 -4
- package/esm2020/radio/public_api.mjs +3 -3
- package/esm2020/radio/radio.module.mjs +59 -59
- package/esm2020/radio/radio.type.mjs +96 -96
- package/esm2020/rate/ngx-formly-zorro-antd-rate.mjs +4 -4
- package/esm2020/rate/public_api.mjs +3 -3
- package/esm2020/rate/rate.module.mjs +51 -51
- package/esm2020/rate/rate.type.mjs +63 -63
- package/esm2020/select/ngx-formly-zorro-antd-select.mjs +4 -4
- package/esm2020/select/public_api.mjs +3 -3
- package/esm2020/select/select.module.mjs +57 -57
- package/esm2020/select/select.props.mjs +2 -2
- package/esm2020/select/select.type.mjs +170 -170
- package/esm2020/slider/ngx-formly-zorro-antd-slider.mjs +4 -4
- package/esm2020/slider/public_api.mjs +3 -3
- package/esm2020/slider/slider.module.mjs +51 -51
- package/esm2020/slider/slider.type.mjs +67 -67
- package/esm2020/switch/ngx-formly-zorro-antd-switch.mjs +4 -4
- package/esm2020/switch/public_api.mjs +3 -3
- package/esm2020/switch/switch.module.mjs +51 -51
- package/esm2020/switch/switch.type.mjs +53 -53
- package/esm2020/tabs/ngx-formly-zorro-antd-tabs.mjs +4 -4
- package/esm2020/tabs/public_api.mjs +3 -3
- package/esm2020/tabs/tabs.module.mjs +41 -41
- package/esm2020/tabs/tabs.props.mjs +2 -2
- package/esm2020/tabs/tabs.wrapper.mjs +115 -115
- package/esm2020/textarea/ngx-formly-zorro-antd-textarea.mjs +4 -4
- package/esm2020/textarea/public_api.mjs +3 -3
- package/esm2020/textarea/textarea.module.mjs +55 -55
- package/esm2020/textarea/textarea.type.mjs +141 -141
- package/esm2020/timepicker/ngx-formly-zorro-antd-timepicker.mjs +4 -4
- package/esm2020/timepicker/public_api.mjs +3 -3
- package/esm2020/timepicker/timepicker.module.mjs +51 -51
- package/esm2020/timepicker/timepicker.type.mjs +96 -96
- package/esm2020/transfer/ngx-formly-zorro-antd-transfer.mjs +4 -4
- package/esm2020/transfer/public_api.mjs +3 -3
- package/esm2020/transfer/transfer.component.mjs +128 -128
- package/esm2020/transfer/transfer.module.mjs +52 -52
- package/esm2020/transfer/transfer.type.mjs +87 -87
- package/esm2020/tree-select/ngx-formly-zorro-antd-tree-select.mjs +4 -4
- package/esm2020/tree-select/public_api.mjs +3 -3
- package/esm2020/tree-select/tree-select.module.mjs +51 -51
- package/esm2020/tree-select/tree-select.type.mjs +100 -101
- package/esm2020/upload/ngx-formly-zorro-antd-upload.mjs +4 -4
- package/esm2020/upload/public_api.mjs +3 -3
- package/esm2020/upload/upload.component.mjs +253 -253
- package/esm2020/upload/upload.module.mjs +60 -60
- package/esm2020/upload/upload.props.mjs +2 -2
- package/esm2020/upload/upload.type.mjs +129 -129
- package/fesm2015/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
- package/fesm2015/ngx-formly-zorro-antd-button.mjs +152 -152
- package/fesm2015/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-card.mjs +77 -77
- package/fesm2015/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-cascader.mjs +145 -145
- package/fesm2015/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs +110 -110
- package/fesm2015/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs +229 -229
- package/fesm2015/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-form-field.mjs +155 -155
- package/fesm2015/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-grid.mjs +97 -97
- package/fesm2015/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input-group.mjs +102 -102
- package/fesm2015/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input-number.mjs +169 -169
- package/fesm2015/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-input.mjs +376 -376
- package/fesm2015/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-radio.mjs +134 -134
- package/fesm2015/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-rate.mjs +97 -97
- package/fesm2015/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-select.mjs +206 -206
- package/fesm2015/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-slider.mjs +101 -101
- package/fesm2015/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-switch.mjs +87 -87
- package/fesm2015/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-tabs.mjs +141 -141
- package/fesm2015/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-textarea.mjs +176 -176
- package/fesm2015/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs +129 -129
- package/fesm2015/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-transfer.mjs +241 -241
- package/fesm2015/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs +133 -134
- package/fesm2015/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd-upload.mjs +410 -410
- package/fesm2015/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2015/ngx-formly-zorro-antd.mjs +74 -74
- package/fesm2015/ngx-formly-zorro-antd.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-autocomplete.mjs +2 -2
- package/fesm2020/ngx-formly-zorro-antd-button.mjs +152 -152
- package/fesm2020/ngx-formly-zorro-antd-button.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-card.mjs +77 -77
- package/fesm2020/ngx-formly-zorro-antd-card.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-cascader.mjs +145 -145
- package/fesm2020/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs +110 -110
- package/fesm2020/ngx-formly-zorro-antd-checkbox.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs +229 -229
- package/fesm2020/ngx-formly-zorro-antd-datepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-form-field.mjs +155 -155
- package/fesm2020/ngx-formly-zorro-antd-form-field.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-grid.mjs +97 -97
- package/fesm2020/ngx-formly-zorro-antd-grid.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input-group.mjs +102 -102
- package/fesm2020/ngx-formly-zorro-antd-input-group.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input-number.mjs +169 -169
- package/fesm2020/ngx-formly-zorro-antd-input-number.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-input.mjs +376 -376
- package/fesm2020/ngx-formly-zorro-antd-input.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-radio.mjs +134 -134
- package/fesm2020/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-rate.mjs +97 -97
- package/fesm2020/ngx-formly-zorro-antd-rate.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-select.mjs +206 -206
- package/fesm2020/ngx-formly-zorro-antd-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-slider.mjs +101 -101
- package/fesm2020/ngx-formly-zorro-antd-slider.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-switch.mjs +87 -87
- package/fesm2020/ngx-formly-zorro-antd-switch.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-tabs.mjs +141 -141
- package/fesm2020/ngx-formly-zorro-antd-tabs.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-textarea.mjs +176 -176
- package/fesm2020/ngx-formly-zorro-antd-textarea.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs +129 -129
- package/fesm2020/ngx-formly-zorro-antd-timepicker.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-transfer.mjs +241 -241
- package/fesm2020/ngx-formly-zorro-antd-transfer.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs +133 -134
- package/fesm2020/ngx-formly-zorro-antd-tree-select.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd-upload.mjs +409 -409
- package/fesm2020/ngx-formly-zorro-antd-upload.mjs.map +1 -1
- package/fesm2020/ngx-formly-zorro-antd.mjs +74 -74
- package/fesm2020/ngx-formly-zorro-antd.mjs.map +1 -1
- package/form-field/form-field.module.d.ts +11 -11
- package/form-field/form-field.props.d.ts +105 -105
- package/form-field/form-field.wrapper.d.ts +9 -9
- package/form-field/index.d.ts +5 -5
- package/form-field/public_api.d.ts +3 -3
- package/grid/grid.module.d.ts +10 -10
- package/grid/grid.props.d.ts +44 -44
- package/grid/grid.type.d.ts +11 -11
- package/grid/index.d.ts +5 -5
- package/grid/public_api.d.ts +3 -3
- package/index.d.ts +1 -1
- package/input/index.d.ts +5 -5
- package/input/input.module.d.ts +14 -14
- package/input/input.props.d.ts +36 -36
- package/input/input.type.d.ts +26 -26
- package/input/public_api.d.ts +2 -2
- package/input-group/index.d.ts +5 -5
- package/input-group/input-group.module.d.ts +11 -11
- package/input-group/input-group.props.d.ts +56 -56
- package/input-group/input-group.type.d.ts +22 -22
- package/input-group/public_api.d.ts +3 -3
- package/input-number/index.d.ts +5 -5
- package/input-number/input-number.module.d.ts +12 -12
- package/input-number/input-number.props.d.ts +81 -81
- package/input-number/input-number.type.d.ts +24 -24
- package/input-number/public_api.d.ts +2 -2
- package/lib/ui-ng-zorro-antd.d.ts +1 -1
- package/lib/ui-ng-zorro-antd.module.d.ts +27 -27
- package/package.json +1 -1
- package/radio/index.d.ts +5 -5
- package/radio/public_api.d.ts +2 -2
- package/radio/radio.module.d.ts +14 -14
- package/radio/radio.type.d.ts +38 -38
- package/rate/index.d.ts +5 -5
- package/rate/public_api.d.ts +2 -2
- package/rate/rate.module.d.ts +12 -12
- package/rate/rate.type.d.ts +57 -57
- package/select/index.d.ts +5 -5
- package/select/public_api.d.ts +2 -2
- package/select/select.module.d.ts +13 -13
- package/select/select.props.d.ts +171 -171
- package/select/select.type.d.ts +36 -36
- package/slider/index.d.ts +5 -5
- package/slider/public_api.d.ts +2 -2
- package/slider/slider.module.d.ts +12 -12
- package/slider/slider.type.d.ts +76 -76
- package/switch/index.d.ts +5 -5
- package/switch/public_api.d.ts +2 -2
- package/switch/switch.module.d.ts +12 -12
- package/switch/switch.type.d.ts +44 -44
- package/tabs/index.d.ts +5 -5
- package/tabs/public_api.d.ts +2 -2
- package/tabs/tabs.module.d.ts +10 -10
- package/tabs/tabs.props.d.ts +126 -126
- package/tabs/tabs.wrapper.d.ts +28 -28
- package/textarea/index.d.ts +5 -5
- package/textarea/public_api.d.ts +2 -2
- package/textarea/textarea.module.d.ts +13 -13
- package/textarea/textarea.type.d.ts +39 -39
- package/timepicker/index.d.ts +5 -5
- package/timepicker/public_api.d.ts +2 -2
- package/timepicker/timepicker.module.d.ts +12 -12
- package/timepicker/timepicker.type.d.ts +138 -138
- package/transfer/index.d.ts +5 -5
- package/transfer/public_api.d.ts +2 -2
- package/transfer/transfer.component.d.ts +26 -26
- package/transfer/transfer.module.d.ts +13 -13
- package/transfer/transfer.type.d.ts +118 -118
- package/tree-select/index.d.ts +5 -5
- package/tree-select/public_api.d.ts +2 -2
- package/tree-select/tree-select.module.d.ts +12 -12
- package/tree-select/tree-select.type.d.ts +163 -164
- package/upload/index.d.ts +5 -5
- package/upload/public_api.d.ts +2 -2
- package/upload/upload.component.d.ts +33 -33
- package/upload/upload.module.d.ts +15 -15
- package/upload/upload.props.d.ts +173 -173
- package/upload/upload.type.d.ts +29 -29
package/upload/upload.props.d.ts
CHANGED
@@ -1,173 +1,173 @@
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
2
|
-
import type { FormlyFieldConfig } from '@ngx-formly/core';
|
3
|
-
import { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';
|
4
|
-
import { Observable, Subscription } from 'rxjs';
|
5
|
-
import type { ThemeType } from '@ant-design/icons-angular';
|
6
|
-
import type { NzUploadChangeParam, NzUploadFile, NzUploadTransformFileType, UploadFilter, NzIconRenderTemplate, NzUploadListType, NzUploadType, NzUploadXHRArgs } from 'ng-zorro-antd/upload';
|
7
|
-
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
8
|
-
export interface UploadProps extends FormlyFieldProps {
|
9
|
-
type?: NzUploadType;
|
10
|
-
/**
|
11
|
-
* 接受上传的文件类型, 详见 input accept Attribute
|
12
|
-
*/
|
13
|
-
accept?: string | string[];
|
14
|
-
/**
|
15
|
-
* 必选参数, 上传的地址
|
16
|
-
*/
|
17
|
-
action?: string | ((file: NzUploadFile) => string | Observable<string>);
|
18
|
-
/**
|
19
|
-
* 支持上传文件夹(caniuse)
|
20
|
-
* @default false
|
21
|
-
*/
|
22
|
-
directory?: boolean;
|
23
|
-
/**
|
24
|
-
* 上传文件之前的钩子,参数为上传的文件,若返回 false 则停止上传。注意:IE9 不支持该方法;注意:务必使用 => 定义处理方法。
|
25
|
-
*/
|
26
|
-
beforeUpload?: (file: NzUploadFile, fileList: NzUploadFile[]) => boolean | Observable<boolean>;
|
27
|
-
/**
|
28
|
-
* 通过覆盖默认的上传行为,可以自定义自己的上传实现;注意:务必使用 => 定义处理方法。
|
29
|
-
*/
|
30
|
-
customRequest?: (item: NzUploadXHRArgs) => Subscription;
|
31
|
-
/**
|
32
|
-
* 上传所需参数或返回上传参数的方法;注意:务必使用 => 定义处理方法。
|
33
|
-
*/
|
34
|
-
data?: {} | ((file: NzUploadFile) => {} | Observable<{}>);
|
35
|
-
/**
|
36
|
-
* 文件列表,双向绑定
|
37
|
-
*/
|
38
|
-
fileList: NzUploadFile[];
|
39
|
-
/**
|
40
|
-
* 限制单次最多上传数量,nzMultiple 打开时有效;0 表示不限
|
41
|
-
* @default 0
|
42
|
-
*/
|
43
|
-
limit?: number;
|
44
|
-
/**
|
45
|
-
* 限制文件大小,单位:KB;0 表示不限
|
46
|
-
* @default 0
|
47
|
-
*/
|
48
|
-
size?: number;
|
49
|
-
/**
|
50
|
-
* 限制文件类型,例如:image/png,image/jpeg,image/gif,image/bmp
|
51
|
-
*/
|
52
|
-
fileType?: string;
|
53
|
-
/**
|
54
|
-
* 自定义过滤器
|
55
|
-
*/
|
56
|
-
filter?: UploadFilter[];
|
57
|
-
/**
|
58
|
-
* 设置上传的请求头部,IE10 以上有效;注意:务必使用 => 定义处理方法。
|
59
|
-
*/
|
60
|
-
headers?: Object | ((file: NzUploadFile) => Object | Observable<{}>);
|
61
|
-
/**
|
62
|
-
* 上传列表的内建样式,支持三种基本样式 text, picture 和 picture-card
|
63
|
-
* @default text
|
64
|
-
*/
|
65
|
-
listType?: NzUploadListType;
|
66
|
-
/**
|
67
|
-
* 是否支持多选文件,ie10+ 支持。开启后按住 ctrl 可选择多个文件。
|
68
|
-
* @default false;
|
69
|
-
*/
|
70
|
-
multiple?: boolean;
|
71
|
-
/**
|
72
|
-
* 发到后台的文件参数名
|
73
|
-
* @default file
|
74
|
-
*/
|
75
|
-
name?: string;
|
76
|
-
/**
|
77
|
-
* 是否展示 uploadList, 可设为一个对象,用于单独设定 showPreviewIcon,showRemoveIcon 和 showDownloadIcon
|
78
|
-
* @default true
|
79
|
-
*/
|
80
|
-
showUploadList?: boolean | {
|
81
|
-
showPreviewIcon?: boolean;
|
82
|
-
showRemoveIcon?: boolean;
|
83
|
-
showDownloadIcon?: boolean;
|
84
|
-
};
|
85
|
-
/**
|
86
|
-
* 是否展示上传按钮
|
87
|
-
* @default true
|
88
|
-
*/
|
89
|
-
showButton?: boolean;
|
90
|
-
/**
|
91
|
-
* 上传请求时是否携带 cookie
|
92
|
-
* @default false
|
93
|
-
*/
|
94
|
-
withCredentials?: boolean;
|
95
|
-
/**
|
96
|
-
* 点击打开文件对话框
|
97
|
-
* @default true
|
98
|
-
*/
|
99
|
-
openFileDialogOnClick?: boolean;
|
100
|
-
/**
|
101
|
-
* 点击文件链接或预览图标时的回调;注意:务必使用 => 定义处理方法。
|
102
|
-
*/
|
103
|
-
preview?: (file: NzUploadFile) => void;
|
104
|
-
/**
|
105
|
-
* 自定义文件预览逻辑;注意:务必使用 => 定义处理方法。
|
106
|
-
*/
|
107
|
-
previewFile?: (file: NzUploadFile) => Observable<string>;
|
108
|
-
/**
|
109
|
-
* 自定义预览文件是否有效图像,一般用于图像URL为非标准格式;注意:务必使用 => 定义处理方法。
|
110
|
-
*/
|
111
|
-
previewIsImage?: (file: NzUploadFile) => boolean;
|
112
|
-
/**
|
113
|
-
* 点击移除文件时的回调,返回值为 false 时不移除。支持返回 Observable 对象;注意:务必使用 => 定义处理方法。
|
114
|
-
*/
|
115
|
-
remove?: (file: NzUploadFile) => boolean | Observable<boolean>;
|
116
|
-
/**
|
117
|
-
* 上传文件改变时的状态
|
118
|
-
*/
|
119
|
-
onChange?: (value: NzUploadChangeParam) => void;
|
120
|
-
/**
|
121
|
-
* 点击下载文件时的回调,如果没有指定,则默认跳转到文件 url 对应的标签页
|
122
|
-
* @default 跳转新标签页
|
123
|
-
*/
|
124
|
-
download?: (file: NzUploadFile) => void;
|
125
|
-
/**
|
126
|
-
* 在上传之前转换文件。支持返回一个 Observable 对象
|
127
|
-
*/
|
128
|
-
transformFile?: (file: NzUploadFile) => NzUploadTransformFileType;
|
129
|
-
/**
|
130
|
-
* 自定义显示 icon
|
131
|
-
*/
|
132
|
-
iconRender?: NzIconRenderTemplate | null;
|
133
|
-
/**
|
134
|
-
* 自定义显示整个列表
|
135
|
-
*/
|
136
|
-
fileListRender?: TemplateRef<void> | null;
|
137
|
-
/**
|
138
|
-
* 文件列表改变事件
|
139
|
-
*/
|
140
|
-
fileListChange?: (field: FormlyFieldConfig, event: NzUploadFile[]) => void;
|
141
|
-
/**
|
142
|
-
* 返回结果格式映射
|
143
|
-
* @returns 默认返回 NzUploadFile[] 格式
|
144
|
-
*/
|
145
|
-
resultMap?: (items: NzUploadFile[]) => NzSafeAny[];
|
146
|
-
/** 上传的提示信息 */
|
147
|
-
hint?: string;
|
148
|
-
/**
|
149
|
-
* 上传显示文本信息
|
150
|
-
*/
|
151
|
-
text?: string;
|
152
|
-
/**
|
153
|
-
* 上传按钮的图标
|
154
|
-
*/
|
155
|
-
uploadButtonIcon?: AntdIcon | null;
|
156
|
-
/**
|
157
|
-
* 是否显示上传按钮
|
158
|
-
* @default true
|
159
|
-
*/
|
160
|
-
showUploadButton?: boolean;
|
161
|
-
}
|
162
|
-
export interface AntdIcon {
|
163
|
-
/** 图标类型 */
|
164
|
-
type: string;
|
165
|
-
/** 图标主题风格,默认:`outline` */
|
166
|
-
theme?: ThemeType;
|
167
|
-
/** 是否有旋转动画,默认:`false` */
|
168
|
-
spin?: boolean;
|
169
|
-
/** 仅适用双色图标,设置双色图标的主要颜色,仅对当前 icon 生效 */
|
170
|
-
twoToneColor?: string;
|
171
|
-
/** 指定来自 IconFont 的图标类型 */
|
172
|
-
iconfont?: string;
|
173
|
-
}
|
1
|
+
import { TemplateRef } from '@angular/core';
|
2
|
+
import type { FormlyFieldConfig } from '@ngx-formly/core';
|
3
|
+
import { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';
|
4
|
+
import { Observable, Subscription } from 'rxjs';
|
5
|
+
import type { ThemeType } from '@ant-design/icons-angular';
|
6
|
+
import type { NzUploadChangeParam, NzUploadFile, NzUploadTransformFileType, UploadFilter, NzIconRenderTemplate, NzUploadListType, NzUploadType, NzUploadXHRArgs } from 'ng-zorro-antd/upload';
|
7
|
+
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
8
|
+
export interface UploadProps extends FormlyFieldProps {
|
9
|
+
type?: NzUploadType;
|
10
|
+
/**
|
11
|
+
* 接受上传的文件类型, 详见 input accept Attribute
|
12
|
+
*/
|
13
|
+
accept?: string | string[];
|
14
|
+
/**
|
15
|
+
* 必选参数, 上传的地址
|
16
|
+
*/
|
17
|
+
action?: string | ((file: NzUploadFile) => string | Observable<string>);
|
18
|
+
/**
|
19
|
+
* 支持上传文件夹(caniuse)
|
20
|
+
* @default false
|
21
|
+
*/
|
22
|
+
directory?: boolean;
|
23
|
+
/**
|
24
|
+
* 上传文件之前的钩子,参数为上传的文件,若返回 false 则停止上传。注意:IE9 不支持该方法;注意:务必使用 => 定义处理方法。
|
25
|
+
*/
|
26
|
+
beforeUpload?: (file: NzUploadFile, fileList: NzUploadFile[]) => boolean | Observable<boolean>;
|
27
|
+
/**
|
28
|
+
* 通过覆盖默认的上传行为,可以自定义自己的上传实现;注意:务必使用 => 定义处理方法。
|
29
|
+
*/
|
30
|
+
customRequest?: (item: NzUploadXHRArgs) => Subscription;
|
31
|
+
/**
|
32
|
+
* 上传所需参数或返回上传参数的方法;注意:务必使用 => 定义处理方法。
|
33
|
+
*/
|
34
|
+
data?: {} | ((file: NzUploadFile) => {} | Observable<{}>);
|
35
|
+
/**
|
36
|
+
* 文件列表,双向绑定
|
37
|
+
*/
|
38
|
+
fileList: NzUploadFile[];
|
39
|
+
/**
|
40
|
+
* 限制单次最多上传数量,nzMultiple 打开时有效;0 表示不限
|
41
|
+
* @default 0
|
42
|
+
*/
|
43
|
+
limit?: number;
|
44
|
+
/**
|
45
|
+
* 限制文件大小,单位:KB;0 表示不限
|
46
|
+
* @default 0
|
47
|
+
*/
|
48
|
+
size?: number;
|
49
|
+
/**
|
50
|
+
* 限制文件类型,例如:image/png,image/jpeg,image/gif,image/bmp
|
51
|
+
*/
|
52
|
+
fileType?: string;
|
53
|
+
/**
|
54
|
+
* 自定义过滤器
|
55
|
+
*/
|
56
|
+
filter?: UploadFilter[];
|
57
|
+
/**
|
58
|
+
* 设置上传的请求头部,IE10 以上有效;注意:务必使用 => 定义处理方法。
|
59
|
+
*/
|
60
|
+
headers?: Object | ((file: NzUploadFile) => Object | Observable<{}>);
|
61
|
+
/**
|
62
|
+
* 上传列表的内建样式,支持三种基本样式 text, picture 和 picture-card
|
63
|
+
* @default text
|
64
|
+
*/
|
65
|
+
listType?: NzUploadListType;
|
66
|
+
/**
|
67
|
+
* 是否支持多选文件,ie10+ 支持。开启后按住 ctrl 可选择多个文件。
|
68
|
+
* @default false;
|
69
|
+
*/
|
70
|
+
multiple?: boolean;
|
71
|
+
/**
|
72
|
+
* 发到后台的文件参数名
|
73
|
+
* @default file
|
74
|
+
*/
|
75
|
+
name?: string;
|
76
|
+
/**
|
77
|
+
* 是否展示 uploadList, 可设为一个对象,用于单独设定 showPreviewIcon,showRemoveIcon 和 showDownloadIcon
|
78
|
+
* @default true
|
79
|
+
*/
|
80
|
+
showUploadList?: boolean | {
|
81
|
+
showPreviewIcon?: boolean;
|
82
|
+
showRemoveIcon?: boolean;
|
83
|
+
showDownloadIcon?: boolean;
|
84
|
+
};
|
85
|
+
/**
|
86
|
+
* 是否展示上传按钮
|
87
|
+
* @default true
|
88
|
+
*/
|
89
|
+
showButton?: boolean;
|
90
|
+
/**
|
91
|
+
* 上传请求时是否携带 cookie
|
92
|
+
* @default false
|
93
|
+
*/
|
94
|
+
withCredentials?: boolean;
|
95
|
+
/**
|
96
|
+
* 点击打开文件对话框
|
97
|
+
* @default true
|
98
|
+
*/
|
99
|
+
openFileDialogOnClick?: boolean;
|
100
|
+
/**
|
101
|
+
* 点击文件链接或预览图标时的回调;注意:务必使用 => 定义处理方法。
|
102
|
+
*/
|
103
|
+
preview?: (file: NzUploadFile) => void;
|
104
|
+
/**
|
105
|
+
* 自定义文件预览逻辑;注意:务必使用 => 定义处理方法。
|
106
|
+
*/
|
107
|
+
previewFile?: (file: NzUploadFile) => Observable<string>;
|
108
|
+
/**
|
109
|
+
* 自定义预览文件是否有效图像,一般用于图像URL为非标准格式;注意:务必使用 => 定义处理方法。
|
110
|
+
*/
|
111
|
+
previewIsImage?: (file: NzUploadFile) => boolean;
|
112
|
+
/**
|
113
|
+
* 点击移除文件时的回调,返回值为 false 时不移除。支持返回 Observable 对象;注意:务必使用 => 定义处理方法。
|
114
|
+
*/
|
115
|
+
remove?: (file: NzUploadFile) => boolean | Observable<boolean>;
|
116
|
+
/**
|
117
|
+
* 上传文件改变时的状态
|
118
|
+
*/
|
119
|
+
onChange?: (value: NzUploadChangeParam) => void;
|
120
|
+
/**
|
121
|
+
* 点击下载文件时的回调,如果没有指定,则默认跳转到文件 url 对应的标签页
|
122
|
+
* @default 跳转新标签页
|
123
|
+
*/
|
124
|
+
download?: (file: NzUploadFile) => void;
|
125
|
+
/**
|
126
|
+
* 在上传之前转换文件。支持返回一个 Observable 对象
|
127
|
+
*/
|
128
|
+
transformFile?: (file: NzUploadFile) => NzUploadTransformFileType;
|
129
|
+
/**
|
130
|
+
* 自定义显示 icon
|
131
|
+
*/
|
132
|
+
iconRender?: NzIconRenderTemplate | null;
|
133
|
+
/**
|
134
|
+
* 自定义显示整个列表
|
135
|
+
*/
|
136
|
+
fileListRender?: TemplateRef<void> | null;
|
137
|
+
/**
|
138
|
+
* 文件列表改变事件
|
139
|
+
*/
|
140
|
+
fileListChange?: (field: FormlyFieldConfig, event: NzUploadFile[]) => void;
|
141
|
+
/**
|
142
|
+
* 返回结果格式映射
|
143
|
+
* @returns 默认返回 NzUploadFile[] 格式
|
144
|
+
*/
|
145
|
+
resultMap?: (items: NzUploadFile[]) => NzSafeAny[];
|
146
|
+
/** 上传的提示信息 */
|
147
|
+
hint?: string;
|
148
|
+
/**
|
149
|
+
* 上传显示文本信息
|
150
|
+
*/
|
151
|
+
text?: string;
|
152
|
+
/**
|
153
|
+
* 上传按钮的图标
|
154
|
+
*/
|
155
|
+
uploadButtonIcon?: AntdIcon | null;
|
156
|
+
/**
|
157
|
+
* 是否显示上传按钮
|
158
|
+
* @default true
|
159
|
+
*/
|
160
|
+
showUploadButton?: boolean;
|
161
|
+
}
|
162
|
+
export interface AntdIcon {
|
163
|
+
/** 图标类型 */
|
164
|
+
type: string;
|
165
|
+
/** 图标主题风格,默认:`outline` */
|
166
|
+
theme?: ThemeType;
|
167
|
+
/** 是否有旋转动画,默认:`false` */
|
168
|
+
spin?: boolean;
|
169
|
+
/** 仅适用双色图标,设置双色图标的主要颜色,仅对当前 icon 生效 */
|
170
|
+
twoToneColor?: string;
|
171
|
+
/** 指定来自 IconFont 的图标类型 */
|
172
|
+
iconfont?: string;
|
173
|
+
}
|
package/upload/upload.type.d.ts
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
import { Type, OnInit } from '@angular/core';
|
2
|
-
import { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';
|
3
|
-
import { UploadNzComponent } from './upload.component';
|
4
|
-
import type { UploadProps } from './upload.props';
|
5
|
-
import * as i0 from "@angular/core";
|
6
|
-
export interface FormlyUploadFieldConfig extends FormlyFieldConfig<UploadProps> {
|
7
|
-
type: 'upload' | Type<FormlyFieldUpload>;
|
8
|
-
}
|
9
|
-
export declare class FormlyFieldUpload extends FieldType<FieldTypeConfig<UploadProps>> implements OnInit {
|
10
|
-
defaultOptions: {
|
11
|
-
props: {
|
12
|
-
listType: "text";
|
13
|
-
name: string;
|
14
|
-
showUploadList: boolean;
|
15
|
-
showButton: boolean;
|
16
|
-
openFileDialogOnClick: boolean;
|
17
|
-
showUploadButton: boolean;
|
18
|
-
limit: number;
|
19
|
-
size: number;
|
20
|
-
fileList: never[];
|
21
|
-
filter: never[];
|
22
|
-
text: string;
|
23
|
-
};
|
24
|
-
};
|
25
|
-
upload: UploadNzComponent;
|
26
|
-
ngOnInit(): void;
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyFieldUpload, never>;
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormlyFieldUpload, "formly-field-upload", never, {}, {}, never, never, false>;
|
29
|
-
}
|
1
|
+
import { Type, OnInit } from '@angular/core';
|
2
|
+
import { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';
|
3
|
+
import { UploadNzComponent } from './upload.component';
|
4
|
+
import type { UploadProps } from './upload.props';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export interface FormlyUploadFieldConfig extends FormlyFieldConfig<UploadProps> {
|
7
|
+
type: 'upload' | Type<FormlyFieldUpload>;
|
8
|
+
}
|
9
|
+
export declare class FormlyFieldUpload extends FieldType<FieldTypeConfig<UploadProps>> implements OnInit {
|
10
|
+
defaultOptions: {
|
11
|
+
props: {
|
12
|
+
listType: "text";
|
13
|
+
name: string;
|
14
|
+
showUploadList: boolean;
|
15
|
+
showButton: boolean;
|
16
|
+
openFileDialogOnClick: boolean;
|
17
|
+
showUploadButton: boolean;
|
18
|
+
limit: number;
|
19
|
+
size: number;
|
20
|
+
fileList: never[];
|
21
|
+
filter: never[];
|
22
|
+
text: string;
|
23
|
+
};
|
24
|
+
};
|
25
|
+
upload: UploadNzComponent;
|
26
|
+
ngOnInit(): void;
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyFieldUpload, never>;
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormlyFieldUpload, "formly-field-upload", never, {}, {}, never, never, false>;
|
29
|
+
}
|