@byteluck-fe/model-driven-controls 7.0.0-props.21 → 7.0.0-props.23
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.
- package/dist/esm/columnControls/CustomColumn/designer.js +1 -0
- package/dist/esm/formControls/Counter/property.js +11 -9
- package/dist/esm/formControls/Image/designer.js +1 -4
- package/dist/esm/formControls/Image/property.js +24 -2
- package/dist/esm/layoutControls/Collapse/designer.js +0 -12
- package/dist/esm/layoutControls/Collapse/property.js +2 -3
- package/dist/esm/listControls/GridTable/designer.js +1 -0
- package/dist/index.umd.js +1 -1
- package/dist/types/formControls/Counter/property.d.ts +1 -1
- package/dist/types/formControls/Image/property.d.ts +14 -2
- package/dist/types/layoutControls/Collapse/property.d.ts +0 -7
- package/package.json +2 -2
|
@@ -76,6 +76,7 @@ function _inherits(subClass, superClass) {
|
|
|
76
76
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
77
77
|
}
|
|
78
78
|
function _instanceof(left, right) {
|
|
79
|
+
"@swc/helpers - instanceof";
|
|
79
80
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
80
81
|
return !!right[Symbol.hasInstance](left);
|
|
81
82
|
} else {
|
|
@@ -84,19 +84,21 @@ var CounterPropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
|
|
|
84
84
|
var _this;
|
|
85
85
|
_this = _call_super(this, CounterPropertyRules, [
|
|
86
86
|
props
|
|
87
|
-
]), _define_property(_this, "defaultValue",
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
]), _define_property(_this, "defaultValue", [
|
|
88
|
+
{
|
|
89
|
+
type: 'number',
|
|
90
|
+
min: 0,
|
|
91
|
+
max: 100,
|
|
92
|
+
message: getLocaleText('CMD.pleaseEnterNumberRange', null, '请输入大于等于{min}且小于等于{max}的数值')
|
|
93
|
+
}
|
|
94
|
+
]), _define_property(_this, "max", {
|
|
93
95
|
type: 'any'
|
|
94
96
|
});
|
|
95
97
|
var valueMax = props.max === '' ? 100 : props.max;
|
|
96
98
|
var valueMin = props.min === '' ? 0 : props.min;
|
|
97
|
-
_this.defaultValue.max = valueMax;
|
|
98
|
-
_this.defaultValue.min = valueMin;
|
|
99
|
-
_this.defaultValue.message = getLocaleText('CMD.pleaseEnterNumberRange', {
|
|
99
|
+
_this.defaultValue[0].max = valueMax;
|
|
100
|
+
_this.defaultValue[0].min = valueMin;
|
|
101
|
+
_this.defaultValue[0].message = getLocaleText('CMD.pleaseEnterNumberRange', {
|
|
100
102
|
max: valueMax,
|
|
101
103
|
min: valueMin
|
|
102
104
|
}, '请输入大于等于{min}且小于等于{max}的数值');
|
|
@@ -197,10 +197,7 @@ _define_property(ImageControl, "setting", [
|
|
|
197
197
|
key: 'attachment-size',
|
|
198
198
|
visible: true
|
|
199
199
|
},
|
|
200
|
-
{
|
|
201
|
-
key: 'image-width-height',
|
|
202
|
-
visible: true
|
|
203
|
-
},
|
|
200
|
+
// { key: 'image-width-height', visible: true },
|
|
204
201
|
{
|
|
205
202
|
key: 'image-defaultval',
|
|
206
203
|
visible: true
|
|
@@ -74,9 +74,30 @@ function _is_native_reflect_construct() {
|
|
|
74
74
|
})();
|
|
75
75
|
}
|
|
76
76
|
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
77
|
+
import { BaseControlPropertyRules } from '@byteluck-fe/model-driven-core';
|
|
77
78
|
import { AttachmentProperty } from '../Attachment';
|
|
78
79
|
import { ImageCompressType } from '../../framework';
|
|
79
80
|
import ImageControl from './designer';
|
|
81
|
+
var MB10 = 10485760;
|
|
82
|
+
var MB30 = 31457280;
|
|
83
|
+
var ImageControlPropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
|
|
84
|
+
"use strict";
|
|
85
|
+
_inherits(ImageControlPropertyRules, BaseControlPropertyRules);
|
|
86
|
+
function ImageControlPropertyRules(props) {
|
|
87
|
+
_class_call_check(this, ImageControlPropertyRules);
|
|
88
|
+
var _this;
|
|
89
|
+
_this = _call_super(this, ImageControlPropertyRules, [
|
|
90
|
+
props
|
|
91
|
+
]), _define_property(_this, "maxSize", {
|
|
92
|
+
type: 'number',
|
|
93
|
+
min: 0,
|
|
94
|
+
max: MB30,
|
|
95
|
+
message: getLocaleText('CMD.attachmentMaxSize', null, '附件大小必须在0MB至30MB之间')
|
|
96
|
+
});
|
|
97
|
+
return _this;
|
|
98
|
+
}
|
|
99
|
+
return ImageControlPropertyRules;
|
|
100
|
+
}(BaseControlPropertyRules);
|
|
80
101
|
var ImageProperty = /*#__PURE__*/ function(AttachmentProperty) {
|
|
81
102
|
"use strict";
|
|
82
103
|
_inherits(ImageProperty, AttachmentProperty);
|
|
@@ -86,7 +107,7 @@ var ImageProperty = /*#__PURE__*/ function(AttachmentProperty) {
|
|
|
86
107
|
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
|
|
87
108
|
_this = _call_super(this, ImageProperty, [
|
|
88
109
|
props
|
|
89
|
-
]), _define_property(_this, "compressTypeCode", void 0), _define_property(_this, "compressRatio", void 0), _define_property(_this, "maxPixel", void 0), _define_property(_this, "
|
|
110
|
+
]), _define_property(_this, "compressTypeCode", void 0), _define_property(_this, "compressRatio", void 0), _define_property(_this, "maxPixel", void 0), _define_property(_this, "maxSize", void 0);
|
|
90
111
|
_this.showType = 'image';
|
|
91
112
|
_this.maxLimit = (_ref = props === null || props === void 0 ? void 0 : props.maxLimit) !== null && _ref !== void 0 ? _ref : 10;
|
|
92
113
|
_this.caption = (_ref1 = (_ref2 = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref2 !== void 0 ? _ref2 : ImageControl.controlName) !== null && _ref1 !== void 0 ? _ref1 : getLocaleText('CMD.image', null, '图片');
|
|
@@ -94,10 +115,11 @@ var ImageProperty = /*#__PURE__*/ function(AttachmentProperty) {
|
|
|
94
115
|
_this.compressTypeCode = (_ref4 = props === null || props === void 0 ? void 0 : props.compressTypeCode) !== null && _ref4 !== void 0 ? _ref4 : ImageCompressType.NO_COMPRESS; // 默认不压缩
|
|
95
116
|
_this.compressRatio = (_ref5 = props === null || props === void 0 ? void 0 : props.compressRatio) !== null && _ref5 !== void 0 ? _ref5 : 1; // 默认压缩比例1
|
|
96
117
|
_this.maxPixel = (_ref6 = props === null || props === void 0 ? void 0 : props.maxPixel) !== null && _ref6 !== void 0 ? _ref6 : 1080; // 默认最大像素1080
|
|
97
|
-
_this.
|
|
118
|
+
_this.maxSize = (_ref7 = props === null || props === void 0 ? void 0 : props.maxSize) !== null && _ref7 !== void 0 ? _ref7 : MB10;
|
|
98
119
|
return _this;
|
|
99
120
|
}
|
|
100
121
|
return ImageProperty;
|
|
101
122
|
}(AttachmentProperty);
|
|
123
|
+
_define_property(ImageProperty, "Rules", ImageControlPropertyRules);
|
|
102
124
|
export default ImageProperty;
|
|
103
125
|
export { ImageProperty };
|
|
@@ -152,21 +152,9 @@ _define_property(CollapseControl, "setting", [
|
|
|
152
152
|
label: '标题左侧显示高亮条',
|
|
153
153
|
default: false
|
|
154
154
|
},
|
|
155
|
-
{
|
|
156
|
-
key: 'common-switch',
|
|
157
|
-
visible: true,
|
|
158
|
-
name: 'ghost',
|
|
159
|
-
label: '幽灵风格',
|
|
160
|
-
default: false,
|
|
161
|
-
tip: '使折叠面板透明且无边框'
|
|
162
|
-
},
|
|
163
155
|
{
|
|
164
156
|
key: 'collapse-pane',
|
|
165
157
|
visible: true
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
key: 'super-setting',
|
|
169
|
-
visible: true
|
|
170
158
|
}
|
|
171
159
|
]);
|
|
172
160
|
export default CollapseControl;
|
|
@@ -80,14 +80,13 @@ var CollapseControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
|
|
|
80
80
|
function CollapseControlProperty(props) {
|
|
81
81
|
_class_call_check(this, CollapseControlProperty);
|
|
82
82
|
var _this;
|
|
83
|
-
var _ref, _ref1
|
|
83
|
+
var _ref, _ref1;
|
|
84
84
|
_this = _call_super(this, CollapseControlProperty, [
|
|
85
85
|
props
|
|
86
|
-
]), _define_property(_this, "accordion", void 0), _define_property(_this, "bordered", void 0), _define_property(_this, "isShowHighlightBar", void 0)
|
|
86
|
+
]), _define_property(_this, "accordion", void 0), _define_property(_this, "bordered", void 0), _define_property(_this, "isShowHighlightBar", void 0);
|
|
87
87
|
_this.accordion = (_ref = props === null || props === void 0 ? void 0 : props.accordion) !== null && _ref !== void 0 ? _ref : false;
|
|
88
88
|
_this.bordered = (props === null || props === void 0 ? void 0 : props.bordered) === false ? false : true;
|
|
89
89
|
_this.isShowHighlightBar = (_ref1 = props === null || props === void 0 ? void 0 : props.isShowHighlightBar) !== null && _ref1 !== void 0 ? _ref1 : false;
|
|
90
|
-
_this.ghost = (_ref2 = props === null || props === void 0 ? void 0 : props.ghost) !== null && _ref2 !== void 0 ? _ref2 : false;
|
|
91
90
|
return _this;
|
|
92
91
|
}
|
|
93
92
|
return CollapseControlProperty;
|
|
@@ -105,6 +105,7 @@ function _inherits(subClass, superClass) {
|
|
|
105
105
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
106
106
|
}
|
|
107
107
|
function _instanceof(left, right) {
|
|
108
|
+
"@swc/helpers - instanceof";
|
|
108
109
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
109
110
|
return !!right[Symbol.hasInstance](left);
|
|
110
111
|
} else {
|