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.
- package/bundles/fantasy-ngzorro.umd.js +18 -2
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-form-lines/hd-form-lines.component.js +15 -3
- package/esm5/hd-form-lines/hd-form-lines.component.js +19 -3
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +14 -2
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +18 -2
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-form-lines/hd-form-lines.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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]
|
|
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]
|
|
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: [{
|