fmui-base 2.3.35 → 2.3.36

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 CHANGED
@@ -3,6 +3,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.3.36:单选多选可输入,输入内容过多时不换行
6
7
  - 2.3.35:upload:鸿蒙微信端上传异常点击无反应问题
7
8
  - 2.3.34:移动端支持新疆CA电子签章功能,去除截图base64png图片的操作
8
9
  - 2.3.33:移动端支持新疆CA电子签章功能,移动端选人组件增加一些再次加载的入口
package/lib/form/form.js CHANGED
@@ -695,8 +695,8 @@ var PageHome = function (_React$Component) {
695
695
  itemParam.decimalPlace = form.decimalPlace; //小数位数
696
696
  itemParam.dataAttr = form['dataAttr'];
697
697
  itemParam.maxlength = form['length'];
698
- /*if(itemParam.dataAttr){
699
- alert("265====="+itemParam.dataAttr.textLineFeed);
698
+ /*if(itemParam.dataAttr){
699
+ alert("265====="+itemParam.dataAttr.textLineFeed);
700
700
  }*/
701
701
  //宏值签名图片
702
702
  // if(itemParam.dataAttr && itemParam.dataAttr.dataSrc=='2' && !readOnly && !itemParam.bizCodeRuleId){
@@ -968,11 +968,11 @@ var PageHome = function (_React$Component) {
968
968
  if (value == item.value) {
969
969
  value = { value: value, text: item.name };
970
970
  }
971
- /*}else{
972
- var defaultValue=form.defaultValue;
973
- if(defaultValue == item.value){
974
- value = {value:value,text:item.name};
975
- }
971
+ /*}else{
972
+ var defaultValue=form.defaultValue;
973
+ if(defaultValue == item.value){
974
+ value = {value:value,text:item.name};
975
+ }
976
976
  }*/
977
977
  selectOptions.push(option);
978
978
  }
@@ -2498,21 +2498,21 @@ var PageHome = function (_React$Component) {
2498
2498
  var length = item.maxlength;
2499
2499
  var patrn = /^-?\d+(\.\d+)?$/;
2500
2500
  if (newValue !== '' && newValue != '-') {
2501
- /* var validAttr=item['validAttr'];
2502
- if(validAttr!=null && validAttr.length>0){
2503
- for(var va=0;va<validAttr.length;va++){
2504
- var regular=validAttr[va]['regular'];
2505
- var tips=validAttr[va]['tips'];
2506
- var reg=new RegExp(regular.slice(1,-1),"g");
2507
- if(!reg.test(newValue)){
2508
- Toast.show({
2509
- type: 'error',
2510
- content:item.title+':'+tips
2511
- });
2512
- return false;
2513
- }
2514
-
2515
- }
2501
+ /* var validAttr=item['validAttr'];
2502
+ if(validAttr!=null && validAttr.length>0){
2503
+ for(var va=0;va<validAttr.length;va++){
2504
+ var regular=validAttr[va]['regular'];
2505
+ var tips=validAttr[va]['tips'];
2506
+ var reg=new RegExp(regular.slice(1,-1),"g");
2507
+ if(!reg.test(newValue)){
2508
+ Toast.show({
2509
+ type: 'error',
2510
+ content:item.title+':'+tips
2511
+ });
2512
+ return false;
2513
+ }
2514
+
2515
+ }
2516
2516
  }*/
2517
2517
  if (this.checkEmoji(newValue)) {
2518
2518
  _Toast2.default.show({
@@ -3671,12 +3671,12 @@ var PageHome = function (_React$Component) {
3671
3671
  });
3672
3672
  return false;
3673
3673
  }
3674
- /* if(newValue=''){
3675
- Toast.show({
3676
- type: 'error',
3677
- content: '意见不能为空!',
3678
- });
3679
- return false;
3674
+ /* if(newValue=''){
3675
+ Toast.show({
3676
+ type: 'error',
3677
+ content: '意见不能为空!',
3678
+ });
3679
+ return false;
3680
3680
  }*/
3681
3681
  if (newValue.length > 2000) {
3682
3682
  newValue = newValue.substring(0, 2000);
@@ -3907,10 +3907,10 @@ var PageHome = function (_React$Component) {
3907
3907
  return resolved.strategy === 'wpsWebOffice' || resolved.officeType === 'wpsWebOffice';
3908
3908
  }
3909
3909
 
3910
- /**
3911
- * 解析正文类型,决定是否显示「编辑正文」。
3912
- * 可编辑且未解析完成:不挂 Upload(占位),避免 initData 把 recordId 冲成附件 id。
3913
- * 解析后:wps → 编辑正文;非 wps → Upload 只读样式。
3910
+ /**
3911
+ * 解析正文类型,决定是否显示「编辑正文」。
3912
+ * 可编辑且未解析完成:不挂 Upload(占位),避免 initData 把 recordId 冲成附件 id。
3913
+ * 解析后:wps → 编辑正文;非 wps → Upload 只读样式。
3914
3914
  */
3915
3915
 
3916
3916
  }, {
@@ -342,28 +342,28 @@ var PageHome = function (_React$Component) {
342
342
  var data = this.props.data;
343
343
  var subTblList = data.subTbl; //子表
344
344
  var relatedTbl = data.relatedTbl; //关联表
345
- /* var calculateExpList = data.calculateExpList;//计算公式列表
346
- var calculateExpList1 = value.calculateExpList;//计算公式列表
347
- if(calculateExpList1){
348
- for(var key in calculateExpList1){
349
- var calculateExpValue;
350
- if(calculateExpList){
351
- calculateExpValue = calculateExpList[key];
352
- if(!calculateExpValue){
353
- calculateExpValue = [];
354
- }
355
- }else{
356
- calculateExpList = {};
357
- calculateExpValue = [];
358
- }
359
- for(var j=0;j<calculateExpList1[key].length;j++){
360
- calculateExpValue.push(calculateExpList1[key][j]);
361
- }
362
- calculateExpList[key] = calculateExpValue;
363
-
364
- }
365
-
366
- data.calculateExpList = calculateExpList;
345
+ /* var calculateExpList = data.calculateExpList;//计算公式列表
346
+ var calculateExpList1 = value.calculateExpList;//计算公式列表
347
+ if(calculateExpList1){
348
+ for(var key in calculateExpList1){
349
+ var calculateExpValue;
350
+ if(calculateExpList){
351
+ calculateExpValue = calculateExpList[key];
352
+ if(!calculateExpValue){
353
+ calculateExpValue = [];
354
+ }
355
+ }else{
356
+ calculateExpList = {};
357
+ calculateExpValue = [];
358
+ }
359
+ for(var j=0;j<calculateExpList1[key].length;j++){
360
+ calculateExpValue.push(calculateExpList1[key][j]);
361
+ }
362
+ calculateExpList[key] = calculateExpValue;
363
+
364
+ }
365
+
366
+ data.calculateExpList = calculateExpList;
367
367
  }*/
368
368
 
369
369
  this.dealwithSubData(subTblList, subTblNo, value, relatedTbl);
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _nvoice = require('./nvoice');
8
+
9
+ Object.defineProperty(exports, 'default', {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return _interopRequireDefault(_nvoice).default;
13
+ }
14
+ });
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,177 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = undefined;
7
+
8
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9
+
10
+ var _react = require('react');
11
+
12
+ var _react2 = _interopRequireDefault(_react);
13
+
14
+ var _Group = require('saltui/lib/Group');
15
+
16
+ var _Group2 = _interopRequireDefault(_Group);
17
+
18
+ var _Field = require('saltui/lib/Field');
19
+
20
+ var _Field2 = _interopRequireDefault(_Field);
21
+
22
+ var _upload = require('../upload/upload');
23
+
24
+ var _upload2 = _interopRequireDefault(_upload);
25
+
26
+ var _Boxs = require('saltui/lib/Boxs');
27
+
28
+ var _Boxs2 = _interopRequireDefault(_Boxs);
29
+
30
+ var _db = require('../db/db');
31
+
32
+ var _db2 = _interopRequireDefault(_db);
33
+
34
+ require('./nvoice.less');
35
+
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
+
38
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
39
+
40
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
41
+
42
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
43
+
44
+ var HBox = _Boxs2.default.HBox,
45
+ Box = _Boxs2.default.Box,
46
+ VBox = _Boxs2.default.VBox;
47
+
48
+ var Nvoice = function (_React$Component) {
49
+ _inherits(Nvoice, _React$Component);
50
+
51
+ function Nvoice(props) {
52
+ _classCallCheck(this, Nvoice);
53
+
54
+ // 传入的props参数
55
+ var _this = _possibleConstructorReturn(this, (Nvoice.__proto__ || Object.getPrototypeOf(Nvoice)).call(this, props));
56
+
57
+ _this.initFn = function (id) {
58
+
59
+ // 初始发票详情数据
60
+ _db2.default.form.getNoInvoiceList({
61
+ invoicedataid: id
62
+ }).then(function (content) {
63
+ _this.setState({
64
+ invoicedata: content
65
+ });
66
+ }).catch(function (error) {
67
+ console.error('获取详情数据失败', error);
68
+ });
69
+ };
70
+
71
+ var invoicedataid = _this.props.id;
72
+ var title = _this.props.label || '发票详情';
73
+ var required = _this.props.required || false;
74
+
75
+ _this.state = {
76
+ invoicedataid: invoicedataid,
77
+ invoicedata: [],
78
+ title: title,
79
+ required: required
80
+ };
81
+
82
+ return _this;
83
+ }
84
+
85
+ _createClass(Nvoice, [{
86
+ key: 'componentDidMount',
87
+ value: function componentDidMount() {
88
+ this.initFn(this.state.invoicedataid);
89
+ }
90
+ }, {
91
+ key: 'downloadFile',
92
+
93
+
94
+ // 下载函数
95
+ value: function (_downloadFile) {
96
+ function downloadFile(_x) {
97
+ return _downloadFile.apply(this, arguments);
98
+ }
99
+
100
+ downloadFile.toString = function () {
101
+ return _downloadFile.toString();
102
+ };
103
+
104
+ return downloadFile;
105
+ }(function (file) {
106
+ downloadFile(file.relaObjId);
107
+ })
108
+ }, {
109
+ key: 'render',
110
+ value: function render() {
111
+ return _react2.default.createElement(
112
+ _Group2.default.List,
113
+ { borderTopNone: true },
114
+ _react2.default.createElement(
115
+ _Field2.default,
116
+ { required: this.state.required, label: this.state.title, layout: 'h', multiLine: true },
117
+ _react2.default.createElement(
118
+ 'div',
119
+ null,
120
+ this.state.invoicedata.map(function (item, index) {
121
+ var fileList = [];
122
+ try {
123
+ if (item.invoicefileInfo) {
124
+ fileList = JSON.parse(item.invoicefileInfo);
125
+ }
126
+ } catch (e) {
127
+ console.error('发票附件解析失败', e);
128
+ }
129
+
130
+ return _react2.default.createElement(
131
+ 'div',
132
+ { key: item.id, className: 't-MT2' },
133
+ _react2.default.createElement(
134
+ VBox,
135
+ { className: 'nvoice-filetitle', hAlign: 'start' },
136
+ _react2.default.createElement(
137
+ Box,
138
+ null,
139
+ item.invoicename
140
+ ),
141
+ _react2.default.createElement(
142
+ HBox,
143
+ { vAlign: 'center' },
144
+ _react2.default.createElement(
145
+ Box,
146
+ { className: 'label label-primary' },
147
+ item.invoicetype
148
+ ),
149
+ _react2.default.createElement(
150
+ Box,
151
+ null,
152
+ '\uFFE5',
153
+ item.invoiceamount
154
+ )
155
+ )
156
+ ),
157
+ _react2.default.createElement(_upload2.default, {
158
+ required: false,
159
+ canDel: false,
160
+ canPreview: true,
161
+ canDownload: true,
162
+ initList: fileList,
163
+ dir: 'form_invoice',
164
+ ref: 'upload_invoice'
165
+ })
166
+ );
167
+ })
168
+ )
169
+ )
170
+ );
171
+ }
172
+ }]);
173
+
174
+ return Nvoice;
175
+ }(_react2.default.Component);
176
+
177
+ exports.default = Nvoice;
File without changes
@@ -393,13 +393,21 @@ var SelectInput = function (_React$Component) {
393
393
  { className: 'dd-select-input-option-text' },
394
394
  option.text
395
395
  ),
396
- showInput ? _react2.default.createElement('input', {
396
+ showInput ? _react2.default.createElement('textarea', {
397
397
  className: 'dd-select-input-text',
398
- type: 'text',
398
+ rows: 1,
399
399
  value: _this3.state.inputValues[optionValue] || ''
400
400
  // 输入框只有在当前项已选中且 readOnly=false 时才允许输入。
401
401
  , disabled: inputDisabled,
402
+ ref: function ref(el) {
403
+ if (el) {
404
+ el.style.height = 'auto';
405
+ el.style.height = el.scrollHeight + 'px';
406
+ }
407
+ },
402
408
  onChange: function onChange(e) {
409
+ e.target.style.height = 'auto';
410
+ e.target.style.height = e.target.scrollHeight + 'px';
403
411
  _this3.handleInputChange(optionValue, e.target.value);
404
412
  },
405
413
  onBlur: function onBlur() {
@@ -4,7 +4,8 @@
4
4
 
5
5
  .dd-select-input-option {
6
6
  display: flex;
7
- align-items: center;
7
+ align-items: flex-start;
8
+ width: 100%;
8
9
  margin: 8px 0;
9
10
  cursor: pointer;
10
11
  }
@@ -21,6 +22,7 @@
21
22
  width: 18px;
22
23
  height: 18px;
23
24
  margin-right: 8px;
25
+ margin-top: 2px;
24
26
  border: 1px solid #c7ced9;
25
27
  background: #fff;
26
28
  transition: all .2s ease;
@@ -67,21 +69,35 @@
67
69
  .dd-select-input-option-text {
68
70
  margin-right: 8px;
69
71
  min-width: 32px;
72
+ max-width: 40%;
73
+ flex: 0 1 auto;
74
+ white-space: normal;
75
+ word-break: break-word;
76
+ line-height: 1.4;
70
77
  }
71
78
 
72
79
  .dd-select-input-text {
73
- flex: 1;
74
- min-width: 120px;
80
+ flex: 1 1 0;
81
+ min-width: 0;
82
+ width: auto;
83
+ max-width: 100%;
75
84
  border: none;
76
85
  border-bottom: 1px solid #ddd;
77
86
  outline: none;
78
87
  padding: 4px 2px;
79
88
  font-size: 14px;
89
+ line-height: 1.4;
80
90
  background-color: transparent;
91
+ white-space: pre-wrap;
92
+ word-break: break-all;
93
+ overflow-wrap: anywhere;
94
+ resize: none;
95
+ overflow: hidden;
96
+ field-sizing: content;
81
97
  }
82
98
 
83
99
  .dd-select-input-text:disabled {
84
100
  color: #333;
85
101
  border-bottom-color: #eee;
86
102
  cursor: not-allowed;
87
- }
103
+ }
@@ -49,8 +49,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
49
49
 
50
50
  function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
51
51
 
52
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
53
- * 流程批示意见区块(默认意见、退回意见等),与 TblForm 纯表单分离使用
52
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
53
+ * 流程批示意见区块(默认意见、退回意见等),与 TblForm 纯表单分离使用
54
54
  */
55
55
 
56
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.3.35",
3
+ "version": "2.3.36",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",