fmui-base 2.3.62 → 2.3.64
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 +4 -0
- package/lib/select_input/selectInput.js +19 -8
- package/lib/select_input/selectInput.less +38 -8
- package/lib/upload/upload.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/form/form.js
CHANGED
|
@@ -3573,6 +3573,8 @@ var PageHome = function (_React$Component) {
|
|
|
3573
3573
|
mainTblDataItem.value = userInfo.stationName || '';
|
|
3574
3574
|
} else if (relatepopuservalue == 'relateusercardid') {
|
|
3575
3575
|
mainTblDataItem.value = userInfo.cardId;
|
|
3576
|
+
} else if (relatepopuservalue == 'relateuserbirthdate') {
|
|
3577
|
+
mainTblDataItem.value = userInfo.birthDate || '';
|
|
3576
3578
|
} else if (relatepopuservalue == 'relateusersex') {
|
|
3577
3579
|
mainTblDataItem.value = userInfo.sexName || '';
|
|
3578
3580
|
} else if (relatepopuservalue == 'relateuserpolitical') {
|
|
@@ -3603,6 +3605,8 @@ var PageHome = function (_React$Component) {
|
|
|
3603
3605
|
mainTblDataItem.value = userInfo.stationName || '';
|
|
3604
3606
|
} else if (relatepopuservalue == 'relateusercardid') {
|
|
3605
3607
|
mainTblDataItem.value = userInfo.cardId;
|
|
3608
|
+
} else if (relatepopuservalue == 'relateuserbirthdate') {
|
|
3609
|
+
mainTblDataItem.value = userInfo.birthDate || '';
|
|
3606
3610
|
} else if (relatepopuservalue == 'relateusersex') {
|
|
3607
3611
|
mainTblDataItem.value = userInfo.sexName || '';
|
|
3608
3612
|
} else if (relatepopuservalue == 'relateuserpolitical') {
|
|
@@ -411,6 +411,9 @@ var SelectInput = function (_React$Component) {
|
|
|
411
411
|
var optionClassName = checked ? 'dd-select-input-option checked' : 'dd-select-input-option';
|
|
412
412
|
var inputDisabled = readOnly || !showInput;
|
|
413
413
|
|
|
414
|
+
var tip = option.inputTip || '';
|
|
415
|
+
var fillClassName = tip ? 'dd-select-input-text dd-select-input-text-tip' : 'dd-select-input-text';
|
|
416
|
+
|
|
414
417
|
return _react2.default.createElement(
|
|
415
418
|
'label',
|
|
416
419
|
{ className: optionClassName, key: optionValue || index },
|
|
@@ -429,18 +432,26 @@ var SelectInput = function (_React$Component) {
|
|
|
429
432
|
{ className: 'dd-select-input-option-text' },
|
|
430
433
|
option.text
|
|
431
434
|
),
|
|
432
|
-
showInput && !readOnly ? _react2.default.createElement('
|
|
433
|
-
className:
|
|
434
|
-
|
|
435
|
-
placeholder:
|
|
436
|
-
value: fillText
|
|
437
|
-
|
|
438
|
-
, disabled: inputDisabled,
|
|
435
|
+
showInput && !readOnly ? _react2.default.createElement('textarea', {
|
|
436
|
+
className: fillClassName,
|
|
437
|
+
rows: 1,
|
|
438
|
+
placeholder: tip,
|
|
439
|
+
value: fillText,
|
|
440
|
+
disabled: inputDisabled,
|
|
439
441
|
onChange: function onChange(e) {
|
|
440
|
-
|
|
442
|
+
var el = e.target;
|
|
443
|
+
el.style.height = 'auto';
|
|
444
|
+
el.style.height = el.scrollHeight + 'px';
|
|
445
|
+
_this5.handleInputChange(optionValue, el.value);
|
|
441
446
|
},
|
|
442
447
|
onBlur: function onBlur() {
|
|
443
448
|
_this5.handleInputBlur();
|
|
449
|
+
},
|
|
450
|
+
ref: function ref(el) {
|
|
451
|
+
if (el) {
|
|
452
|
+
el.style.height = 'auto';
|
|
453
|
+
el.style.height = el.scrollHeight + 'px';
|
|
454
|
+
}
|
|
444
455
|
}
|
|
445
456
|
}) : null,
|
|
446
457
|
showInput && readOnly && fillText ? _react2.default.createElement(
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
.dd-select-input-field {
|
|
2
2
|
width: 100%;
|
|
3
|
+
min-width: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
3
5
|
}
|
|
4
6
|
|
|
7
|
+
/* 与 PC 一致:图标 + 选项文案 + 填空同一行;长提示在填空框内换行 */
|
|
5
8
|
.dd-select-input-option {
|
|
6
9
|
display: flex;
|
|
7
|
-
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
flex-wrap: nowrap;
|
|
12
|
+
align-items: flex-start;
|
|
8
13
|
margin: 8px 12px 8px 0;
|
|
9
14
|
cursor: pointer;
|
|
15
|
+
min-width: 0;
|
|
16
|
+
box-sizing: border-box;
|
|
10
17
|
}
|
|
11
18
|
|
|
12
19
|
.dd-select-input-native {
|
|
@@ -21,6 +28,7 @@
|
|
|
21
28
|
width: 18px;
|
|
22
29
|
height: 18px;
|
|
23
30
|
margin-right: 8px;
|
|
31
|
+
margin-top: 5px;
|
|
24
32
|
border: 1px solid #c7ced9;
|
|
25
33
|
background: #fff;
|
|
26
34
|
transition: all .2s ease;
|
|
@@ -65,20 +73,39 @@
|
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
.dd-select-input-option-text {
|
|
76
|
+
flex: 0 0 auto;
|
|
68
77
|
margin-right: 8px;
|
|
78
|
+
margin-top: 4px;
|
|
69
79
|
min-width: 32px;
|
|
80
|
+
line-height: 1.47;
|
|
70
81
|
}
|
|
71
82
|
|
|
83
|
+
/* 紧挨选项文案,占满剩余宽度;长 placeholder 在框内换行 */
|
|
72
84
|
.dd-select-input-text {
|
|
73
|
-
flex: 1;
|
|
74
|
-
min-width:
|
|
85
|
+
flex: 1 1 0;
|
|
86
|
+
min-width: 0;
|
|
87
|
+
width: auto;
|
|
88
|
+
max-width: 100%;
|
|
89
|
+
min-height: 28px;
|
|
90
|
+
margin: 0;
|
|
91
|
+
box-sizing: border-box;
|
|
75
92
|
border: none;
|
|
76
93
|
border-bottom: 2px solid #999;
|
|
77
94
|
outline: none;
|
|
78
95
|
padding: 4px 5px;
|
|
79
|
-
margin-left: 6px;
|
|
80
96
|
font-size: 14px;
|
|
97
|
+
line-height: 1.47;
|
|
81
98
|
background-color: transparent;
|
|
99
|
+
resize: none;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
word-break: break-all;
|
|
102
|
+
overflow-wrap: anywhere;
|
|
103
|
+
white-space: pre-wrap;
|
|
104
|
+
field-sizing: content;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.dd-select-input-text-tip {
|
|
108
|
+
min-height: 28px;
|
|
82
109
|
}
|
|
83
110
|
|
|
84
111
|
.dd-select-input-text:disabled {
|
|
@@ -88,11 +115,14 @@
|
|
|
88
115
|
}
|
|
89
116
|
|
|
90
117
|
.dd-select-input-text-ro {
|
|
118
|
+
flex: 1 1 0;
|
|
119
|
+
min-width: 0;
|
|
91
120
|
display: inline-block;
|
|
92
|
-
margin
|
|
93
|
-
padding:
|
|
94
|
-
|
|
121
|
+
margin: 0;
|
|
122
|
+
padding: 4px 5px;
|
|
123
|
+
box-sizing: border-box;
|
|
95
124
|
color: #333;
|
|
96
125
|
line-height: 1.47;
|
|
97
126
|
word-break: break-all;
|
|
98
|
-
|
|
127
|
+
white-space: pre-wrap;
|
|
128
|
+
}
|
package/lib/upload/upload.js
CHANGED
|
@@ -368,6 +368,14 @@ var PageHome = function (_React$Component) {
|
|
|
368
368
|
return false;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
+
// 上传前自定义函数:传入文件大小,返回 false 则阻止上传
|
|
372
|
+
if (typeof t.props.onBeforeUpload === 'function') {
|
|
373
|
+
var canUpload = t.props.onBeforeUpload(file.size, file);
|
|
374
|
+
if (canUpload === false) {
|
|
375
|
+
file.cancel();
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
371
379
|
// console.info('queuefileadded', file);
|
|
372
380
|
file.session().progress(function (e) {
|
|
373
381
|
// console.info('progress', e);
|