@byteluck-fe/model-driven-controls 7.0.0-props.22 → 7.0.0-props.24

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.
@@ -53,7 +53,7 @@ interface CounterPropertyInterface extends BaseControlPropertyInterface {
53
53
  controlPosition: 'both' | 'right';
54
54
  }
55
55
  declare class CounterPropertyRules extends BaseControlPropertyRules {
56
- defaultValue: RuleItem;
56
+ defaultValue: RuleItem[];
57
57
  max: RuleItem;
58
58
  constructor(props: CounterProperty);
59
59
  }
@@ -1,4 +1,10 @@
1
+ import { BaseControlPropertyRules } from '@byteluck-fe/model-driven-core';
1
2
  import { AttachmentProperty, AttachmentPropertyInterface } from '../Attachment';
3
+ import { RuleItem } from 'async-validator';
4
+ declare class ImageControlPropertyRules extends BaseControlPropertyRules {
5
+ maxSize: RuleItem;
6
+ constructor(props: ImageProperty);
7
+ }
2
8
  interface ImagePropertyInterface extends AttachmentPropertyInterface {
3
9
  /**
4
10
  * 压缩类型;取值:0:不压缩;1:比例压缩;2:像素压缩;
@@ -18,11 +24,24 @@ interface ImagePropertyInterface extends AttachmentPropertyInterface {
18
24
  * @public
19
25
  */
20
26
  maxPixel: number;
27
+ /**
28
+ * 图片尺寸限制;第一个值为宽度限制;第二个值为高度限制;空数组则没有限制
29
+ * @defaultValue []
30
+ * @public
31
+ */
32
+ /**
33
+ * 最大文件大小,单位为字节
34
+ * @defaultValue 104857600
35
+ * @public
36
+ */
37
+ maxSize: number;
21
38
  }
22
39
  declare class ImageProperty extends AttachmentProperty implements ImagePropertyInterface {
40
+ static readonly Rules: typeof ImageControlPropertyRules;
23
41
  compressTypeCode: string;
24
42
  compressRatio: number;
25
43
  maxPixel: number;
44
+ maxSize: number;
26
45
  constructor(props?: Partial<ImageProperty>);
27
46
  }
28
47
  export default ImageProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-controls",
3
- "version": "7.0.0-props.22",
3
+ "version": "7.0.0-props.24",
4
4
  "description": "> TODO: description",
5
5
  "author": "郝晨光 <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -31,5 +31,5 @@
31
31
  "@byteluck-fe/model-driven-shared": "7.0.0-props.19",
32
32
  "async-validator": "3.5.1"
33
33
  },
34
- "gitHead": "d0e8a37e0e56238c4c26417df5f74997bdc11539"
34
+ "gitHead": "5030b13f32fd92b8f12809b2910d4b6e901f6dde"
35
35
  }