fmui-base 2.2.1 → 2.2.3
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/README.md +2 -0
- package/lib/form/form.js +43 -1
- package/lib/poppage/check.js +1 -1
- package/lib/process_info/FlowChart.js +1 -1
- package/lib/upload/upload.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/form/form.js
CHANGED
|
@@ -373,6 +373,7 @@ var PageHome = function (_React$Component) {
|
|
|
373
373
|
itemParam.required = required;
|
|
374
374
|
if (itemType == 'text') {
|
|
375
375
|
itemParam.inputFormat = form.inputFormat;
|
|
376
|
+
itemParam.fieldType = form.fieldType;
|
|
376
377
|
itemParam.decimalPlace = form.decimalPlace;
|
|
377
378
|
}
|
|
378
379
|
|
|
@@ -406,6 +407,7 @@ var PageHome = function (_React$Component) {
|
|
|
406
407
|
tableData.required = required;
|
|
407
408
|
tableData.label = title;
|
|
408
409
|
tableData.inputFormat = form.inputFormat;
|
|
410
|
+
tableData.fieldType = form.fieldType;
|
|
409
411
|
tableData.decimalPlace = form.decimalPlace;
|
|
410
412
|
tableData.fieldId = form.fieldId;
|
|
411
413
|
tableData.uniqueName = uniqueName;
|
|
@@ -444,6 +446,7 @@ var PageHome = function (_React$Component) {
|
|
|
444
446
|
tableData.required = required;
|
|
445
447
|
tableData.label = title;
|
|
446
448
|
tableData.inputFormat = form.inputFormat;
|
|
449
|
+
tableData.fieldType = form.fieldType;
|
|
447
450
|
tableData.decimalPlace = form.decimalPlace;
|
|
448
451
|
tableData.fieldId = form.fieldId;
|
|
449
452
|
tableData.uniqueName = uniqueName;
|
|
@@ -465,6 +468,7 @@ var PageHome = function (_React$Component) {
|
|
|
465
468
|
tableData.required = required;
|
|
466
469
|
tableData.label = title;
|
|
467
470
|
tableData.inputFormat = form.inputFormat;
|
|
471
|
+
tableData.fieldType = form.fieldType;
|
|
468
472
|
tableData.decimalPlace = form.decimalPlace;
|
|
469
473
|
tableData.fieldId = form.fieldId;
|
|
470
474
|
tableData.uniqueName = uniqueName;
|
|
@@ -487,6 +491,7 @@ var PageHome = function (_React$Component) {
|
|
|
487
491
|
tableData.required = required;
|
|
488
492
|
tableData.label = title;
|
|
489
493
|
tableData.inputFormat = form.inputFormat;
|
|
494
|
+
tableData.fieldType = form.fieldType;
|
|
490
495
|
tableData.decimalPlace = form.decimalPlace;
|
|
491
496
|
tableData.fieldId = form.fieldId;
|
|
492
497
|
tableData.uniqueName = uniqueName;
|
|
@@ -512,6 +517,7 @@ var PageHome = function (_React$Component) {
|
|
|
512
517
|
itemParam.required = required;
|
|
513
518
|
itemParam.readOnly = readOnly;
|
|
514
519
|
tableData.inputFormat = form.inputFormat;
|
|
520
|
+
tableData.fieldType = form.fieldType;
|
|
515
521
|
tableData.decimalPlace = form.decimalPlace;
|
|
516
522
|
tableData.fieldId = form.fieldId;
|
|
517
523
|
tableData.uniqueName = uniqueName;
|
|
@@ -643,6 +649,7 @@ var PageHome = function (_React$Component) {
|
|
|
643
649
|
//单行文本框
|
|
644
650
|
//alert('260=====');
|
|
645
651
|
itemParam.inputFormat = form.inputFormat; //文本类型
|
|
652
|
+
itemParam.fieldType = form.fieldType; //字段类型
|
|
646
653
|
itemParam.decimalPlace = form.decimalPlace; //小数位数
|
|
647
654
|
itemParam.dataAttr = form['dataAttr'];
|
|
648
655
|
itemParam.maxlength = form['length'];
|
|
@@ -1917,6 +1924,7 @@ var PageHome = function (_React$Component) {
|
|
|
1917
1924
|
relatedItem.required = itemParam.required;
|
|
1918
1925
|
relatedItem.label = itemParam.title;
|
|
1919
1926
|
relatedItem.inputFormat = itemParam.inputFormat;
|
|
1927
|
+
relatedItem.fieldType = itemParam.fieldType;
|
|
1920
1928
|
relatedItem.decimalPlace = itemParam.decimalPlace;
|
|
1921
1929
|
// if(item.showValue){
|
|
1922
1930
|
// value = item.showValue;
|
|
@@ -1950,6 +1958,7 @@ var PageHome = function (_React$Component) {
|
|
|
1950
1958
|
mainTblData[i].required = itemParam.required;
|
|
1951
1959
|
mainTblData[i].label = itemParam.title;
|
|
1952
1960
|
mainTblData[i].inputFormat = itemParam.inputFormat;
|
|
1961
|
+
mainTblData[i].fieldType = itemParam.fieldType;
|
|
1953
1962
|
mainTblData[i].decimalPlace = itemParam.decimalPlace;
|
|
1954
1963
|
// if(item.showValue){
|
|
1955
1964
|
// value = item.showValue;
|
|
@@ -2073,6 +2082,7 @@ var PageHome = function (_React$Component) {
|
|
|
2073
2082
|
key: 'handleTextChange',
|
|
2074
2083
|
value: function handleTextChange(item, newValue) {
|
|
2075
2084
|
var inputFormat = item.inputFormat;
|
|
2085
|
+
var fieldType = item.fieldType;
|
|
2076
2086
|
var decimalPlace = parseInt(item.decimalPlace);
|
|
2077
2087
|
var length = item.maxlength;
|
|
2078
2088
|
var patrn = /^-?\d+(\.\d+)?$/;
|
|
@@ -2110,7 +2120,7 @@ var PageHome = function (_React$Component) {
|
|
|
2110
2120
|
return false;
|
|
2111
2121
|
}
|
|
2112
2122
|
}
|
|
2113
|
-
if (inputFormat == 'float') {
|
|
2123
|
+
if (inputFormat == 'float' || fieldType == 'float') {
|
|
2114
2124
|
if (!Number(newValue) && !patrn.test(Number(newValue))) {
|
|
2115
2125
|
_Toast2.default.show({
|
|
2116
2126
|
type: 'error',
|
|
@@ -2229,6 +2239,10 @@ var PageHome = function (_React$Component) {
|
|
|
2229
2239
|
data = this.editData(name, newValue, data);
|
|
2230
2240
|
var itemParam = this.state.itemParam;
|
|
2231
2241
|
var length = itemParam.maxlength;
|
|
2242
|
+
var inputFormat = itemParam.inputFormat;
|
|
2243
|
+
var fieldType = itemParam.fieldType;
|
|
2244
|
+
var decimalPlace = parseInt(itemParam.decimalPlace);
|
|
2245
|
+
var patrn = /^-?\d+(\.\d+)?$/;
|
|
2232
2246
|
|
|
2233
2247
|
if (this.checkEmoji(newValue)) {
|
|
2234
2248
|
_Toast2.default.show({
|
|
@@ -2246,6 +2260,34 @@ var PageHome = function (_React$Component) {
|
|
|
2246
2260
|
return false;
|
|
2247
2261
|
}
|
|
2248
2262
|
}
|
|
2263
|
+
if (inputFormat == 'float' || fieldType == 'float') {
|
|
2264
|
+
if (!Number(newValue) && !patrn.test(Number(newValue))) {
|
|
2265
|
+
_Toast2.default.show({
|
|
2266
|
+
type: 'error',
|
|
2267
|
+
content: itemParam.title + "应为小数"
|
|
2268
|
+
});
|
|
2269
|
+
return false;
|
|
2270
|
+
} else {
|
|
2271
|
+
var newValueArray = newValue.split(".");
|
|
2272
|
+
if (newValueArray.length > 1) {
|
|
2273
|
+
if (newValueArray[1].length > decimalPlace) {
|
|
2274
|
+
_Toast2.default.show({
|
|
2275
|
+
type: 'error',
|
|
2276
|
+
content: "小数应小于等于" + decimalPlace
|
|
2277
|
+
});
|
|
2278
|
+
return false;
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
} else if (inputFormat == 'int') {
|
|
2283
|
+
if (!/^-?[0-9]\d*$/.test(newValue)) {
|
|
2284
|
+
_Toast2.default.show({
|
|
2285
|
+
type: 'error',
|
|
2286
|
+
content: itemParam.title + "应为整数"
|
|
2287
|
+
});
|
|
2288
|
+
return false;
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2249
2291
|
itemParam.value = newValue;
|
|
2250
2292
|
this.setState({
|
|
2251
2293
|
itemParam: itemParam
|
package/lib/poppage/check.js
CHANGED
|
@@ -535,7 +535,7 @@ var PageHome = function (_React$Component) {
|
|
|
535
535
|
_react2.default.createElement(
|
|
536
536
|
Box,
|
|
537
537
|
{ className: isIcon || readOnly ? 't-DN' : 't-PR4' },
|
|
538
|
-
_react2.default.createElement('b', { className: 'iconfont icon-
|
|
538
|
+
_react2.default.createElement('b', { className: 'iconfont icon-right-arrow t-rotate-180 t-FCc t-FS16' })
|
|
539
539
|
)
|
|
540
540
|
)
|
|
541
541
|
)
|
|
@@ -155,7 +155,7 @@ var Page = function (_React$Component) {
|
|
|
155
155
|
{ className: 'recording-card' },
|
|
156
156
|
_react2.default.createElement(
|
|
157
157
|
'div',
|
|
158
|
-
{ className:
|
|
158
|
+
{ className: i == this.state.processLogList.length - 1 ? "recording-message theme-color active" : "recording-message theme-color" },
|
|
159
159
|
_react2.default.createElement(
|
|
160
160
|
'div',
|
|
161
161
|
{ className: 't-omit', style: { color: '#999999' } },
|
package/lib/upload/upload.js
CHANGED
|
@@ -633,7 +633,7 @@ var PageHome = function (_React$Component) {
|
|
|
633
633
|
),
|
|
634
634
|
_react2.default.createElement(
|
|
635
635
|
'div',
|
|
636
|
-
{ className: t.state.uploadType == 'image' ? "t-FBH t-fw" : "upload" },
|
|
636
|
+
{ className: t.state.uploadType == 'image' ? "t-FBH t-fw t-JCR" : "upload" },
|
|
637
637
|
t.state.initList.map(function (item, i) {
|
|
638
638
|
function calculate(no) {
|
|
639
639
|
var a = no / 1024;
|