@bchr/bchr-front-lib 0.3.149 → 0.3.150
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.
|
@@ -484,7 +484,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
484
484
|
initialValue = initialValue || [];
|
|
485
485
|
|
|
486
486
|
if (_typeof(initialValue) !== "object") {
|
|
487
|
-
initialValue = initialValue ?
|
|
487
|
+
initialValue = initialValue ? initialValue.split(",") : [];
|
|
488
488
|
}
|
|
489
489
|
} else {
|
|
490
490
|
if (typeof initialValue === 'number') {
|
|
@@ -514,7 +514,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
514
514
|
initialValue = data[code] || [];
|
|
515
515
|
|
|
516
516
|
if (_typeof(initialValue) !== "object") {
|
|
517
|
-
initialValue = initialValue ?
|
|
517
|
+
initialValue = initialValue ? initialValue.split(",") : [];
|
|
518
518
|
}
|
|
519
519
|
} else {
|
|
520
520
|
initialValue = data[code] && data[code] > 0 ? data[code] + "" : null;
|
|
@@ -1220,7 +1220,8 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
1220
1220
|
value: function treeSelectOnChange(ref, config, callback, value, label, extra) {
|
|
1221
1221
|
var display_code = config.display_code;
|
|
1222
1222
|
label = extra.allCheckedNodes.map(function (item) {
|
|
1223
|
-
var
|
|
1223
|
+
var node = item.node;
|
|
1224
|
+
var props = node ? item.node.props : item.node;
|
|
1224
1225
|
var ext_attr_value = props.ext_attr_value,
|
|
1225
1226
|
title = props.title;
|
|
1226
1227
|
|
|
@@ -1430,6 +1431,8 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
1430
1431
|
|
|
1431
1432
|
if (value instanceof _moment["default"] && value._f === 'YYYY' || value instanceof _moment["default"] && value._f === 'YYYYMM') {
|
|
1432
1433
|
value = value ? value.format(value._f) : '';
|
|
1434
|
+
} else if (value instanceof Array) {
|
|
1435
|
+
value = value ? value.join(",") : null;
|
|
1433
1436
|
}
|
|
1434
1437
|
|
|
1435
1438
|
this.props.data[attr] = value;
|
package/package.json
CHANGED
|
@@ -528,7 +528,7 @@ class FormForModify extends React.Component{
|
|
|
528
528
|
if (b_multiple) {
|
|
529
529
|
initialValue = initialValue || [];
|
|
530
530
|
if (typeof initialValue !== "object") {
|
|
531
|
-
initialValue = initialValue ?
|
|
531
|
+
initialValue = initialValue ? initialValue.split(",") : [];
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
else {
|
|
@@ -568,7 +568,7 @@ class FormForModify extends React.Component{
|
|
|
568
568
|
if (b_multiple) {
|
|
569
569
|
initialValue = data[code] || [];
|
|
570
570
|
if (typeof initialValue !== "object") {
|
|
571
|
-
initialValue = initialValue ?
|
|
571
|
+
initialValue = initialValue ? initialValue.split(",") : [];
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
else {
|
|
@@ -1041,7 +1041,8 @@ class FormForModify extends React.Component{
|
|
|
1041
1041
|
let {display_code} = config;
|
|
1042
1042
|
|
|
1043
1043
|
label = extra.allCheckedNodes.map(item => {
|
|
1044
|
-
let
|
|
1044
|
+
let node = item.node;
|
|
1045
|
+
let props = node ? item.node.props : item.node;
|
|
1045
1046
|
let {ext_attr_value, title} = props;
|
|
1046
1047
|
|
|
1047
1048
|
if (ext_attr_value != null && ext_attr_value.length > 0 && title.indexOf(ext_attr_value) === 0) {
|
|
@@ -1348,6 +1349,8 @@ class FormForModify extends React.Component{
|
|
|
1348
1349
|
|
|
1349
1350
|
if ((value instanceof moment && value._f === 'YYYY') || (value instanceof moment && value._f === 'YYYYMM')) {
|
|
1350
1351
|
value = value ? value.format(value._f) : '';
|
|
1352
|
+
} else if (value instanceof Array) {
|
|
1353
|
+
value = value ? value.join(",") : null;
|
|
1351
1354
|
}
|
|
1352
1355
|
|
|
1353
1356
|
this.props.data[attr] = value;
|