fantasy-ngzorro 1.3.44 → 1.3.45

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.
@@ -1910,7 +1910,7 @@ class HdFormLinesComponent {
1910
1910
  (item) => {
1911
1911
  // 新增行 初始数据都为null
1912
1912
  formGroupObj[item.name] = this.fb.control({
1913
- value: formLinesDataItem[item.name] === 0 ? 0 : (formLinesDataItem[item.name] || item.value || null),
1913
+ value: this.judgeValueIsNotEmpty(formLinesDataItem[item.name]) ? formLinesDataItem[item.name] : (item.value || null),
1914
1914
  disabled: item.disabled
1915
1915
  }, item.require ? [Validators.required] : []);
1916
1916
  if (item.selectOption && item.selectOption.label) {
@@ -2232,7 +2232,7 @@ class HdFormLinesComponent {
2232
2232
  (item) => {
2233
2233
  // 新增行 初始数据都为null
2234
2234
  formGroupObj[item.name] = this.fb.control({
2235
- value: formLinesDataItem[item.name] === 0 ? 0 : (formLinesDataItem[item.name] || item.value || null),
2235
+ value: this.judgeValueIsNotEmpty(formLinesDataItem[item.name]) ? formLinesDataItem[item.name] : (item.value || null),
2236
2236
  disabled: item.disabled
2237
2237
  }, item.require ? [Validators.required] : []);
2238
2238
  if (item.selectOption && item.selectOption.label) {
@@ -2608,6 +2608,18 @@ class HdFormLinesComponent {
2608
2608
  return '<空>';
2609
2609
  }
2610
2610
  }
2611
+ /**
2612
+ * @param {?} str
2613
+ * @return {?}
2614
+ */
2615
+ judgeValueIsNotEmpty(str) {
2616
+ if (str === null && str === undefined) {
2617
+ return false;
2618
+ }
2619
+ else {
2620
+ return true;
2621
+ }
2622
+ }
2611
2623
  }
2612
2624
  HdFormLinesComponent.decorators = [
2613
2625
  { type: Component, args: [{