fantasy-ngzorro 1.0.54 → 1.0.56
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 +34 -10
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +2 -2
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-form-lines/hd-form-lines.component.js +31 -8
- package/esm5/hd-form-lines/hd-form-lines.component.js +31 -8
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +30 -7
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +30 -7
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('ng-zorro-antd'), require('@angular/forms'), require('ng-zorro-antd/core'), require('lodash'), require('@angular/cdk/drag-drop'), require('ng-zorro-antd/table'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('fantasy-ngzorro', ['exports', '@angular/core', '@angular/common', 'ng-zorro-antd', '@angular/forms', 'ng-zorro-antd/core', 'lodash', '@angular/cdk/drag-drop', 'ng-zorro-antd/table', '
|
|
4
|
-
(global = global || self, factory(global['fantasy-ngzorro'] = {}, global.ng.core, global.ng.common, global.ngZorroAntd, global.ng.forms, global.core$1, global.lodash, global.ng.cdk['drag-drop'], global.table, global.
|
|
5
|
-
}(this, (function (exports, core, common, ngZorroAntd, forms, core$1, lodash, dragDrop, table,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('ng-zorro-antd'), require('@angular/forms'), require('ng-zorro-antd/core'), require('lodash'), require('@angular/cdk/drag-drop'), require('ng-zorro-antd/table'), require('ng-zorro-antd/modal')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('fantasy-ngzorro', ['exports', '@angular/core', '@angular/common', 'ng-zorro-antd', '@angular/forms', 'ng-zorro-antd/core', 'lodash', '@angular/cdk/drag-drop', 'ng-zorro-antd/table', 'ng-zorro-antd/modal'], factory) :
|
|
4
|
+
(global = global || self, factory(global['fantasy-ngzorro'] = {}, global.ng.core, global.ng.common, global.ngZorroAntd, global.ng.forms, global.core$1, global.lodash, global.ng.cdk['drag-drop'], global.table, global.modal));
|
|
5
|
+
}(this, (function (exports, core, common, ngZorroAntd, forms, core$1, lodash, dragDrop, table, modal) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1771,7 +1771,7 @@
|
|
|
1771
1771
|
// 缓存一下总的表单数据
|
|
1772
1772
|
this.storeFormLinesData = this.formLinesData;
|
|
1773
1773
|
this.init();
|
|
1774
|
-
localforage.setItem(location.host, '12312321');
|
|
1774
|
+
// localforage.setItem(location.host, '12312321');
|
|
1775
1775
|
};
|
|
1776
1776
|
Object.defineProperty(HdFormLinesComponent.prototype, "linesFormArray", {
|
|
1777
1777
|
get: /**
|
|
@@ -1902,6 +1902,7 @@
|
|
|
1902
1902
|
*/
|
|
1903
1903
|
function () {
|
|
1904
1904
|
var _this = this;
|
|
1905
|
+
console.log('this.filterStr', this.filterStr);
|
|
1905
1906
|
this.tableLoading = true;
|
|
1906
1907
|
// 如果没有输入搜索字符串,则显示缓存内的所有数据
|
|
1907
1908
|
if (!this.filterStr) {
|
|
@@ -1911,8 +1912,10 @@
|
|
|
1911
1912
|
}
|
|
1912
1913
|
/** @type {?} */
|
|
1913
1914
|
var filterValue = this.filterStr.trim().toLowerCase();
|
|
1915
|
+
console.log('this.filterValue', filterValue);
|
|
1914
1916
|
this.isFilterData = true;
|
|
1915
1917
|
this.filterIndexStore = [];
|
|
1918
|
+
console.log('this.storeFormLinesData', this.storeFormLinesData);
|
|
1916
1919
|
// 根据搜索字符串过滤数据
|
|
1917
1920
|
/** @type {?} */
|
|
1918
1921
|
var filteredData = this.storeFormLinesData.filter((/**
|
|
@@ -1925,11 +1928,14 @@
|
|
|
1925
1928
|
try {
|
|
1926
1929
|
for (var _b = __values(_this.formLines), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1927
1930
|
var item = _c.value;
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1931
|
+
if (!item.hide) {
|
|
1932
|
+
/** @type {?} */
|
|
1933
|
+
var value = data[item.name] ? data[item.name].toString().toLowerCase() : '';
|
|
1934
|
+
console.log('value', value);
|
|
1935
|
+
if (value.includes(filterValue)) {
|
|
1936
|
+
_this.filterIndexStore.push(index);
|
|
1937
|
+
return true;
|
|
1938
|
+
}
|
|
1933
1939
|
}
|
|
1934
1940
|
}
|
|
1935
1941
|
}
|
|
@@ -2202,6 +2208,9 @@
|
|
|
2202
2208
|
}));
|
|
2203
2209
|
this.tableLoading = false;
|
|
2204
2210
|
this.showForm = true;
|
|
2211
|
+
if (this.formLinesData.length === 0) {
|
|
2212
|
+
this.addFormLine();
|
|
2213
|
+
}
|
|
2205
2214
|
};
|
|
2206
2215
|
/**
|
|
2207
2216
|
* @param {?=} index
|
|
@@ -2324,6 +2333,7 @@
|
|
|
2324
2333
|
if (addIndex !== -1) {
|
|
2325
2334
|
this.storeFormLinesData.splice(this.filterIndexStore[addIndex - 1] + 1, 0, getNowLines[addIndex]);
|
|
2326
2335
|
}
|
|
2336
|
+
this.filterIndexStore.push(this.filterIndexStore[addIndex - 1] + 1);
|
|
2327
2337
|
}
|
|
2328
2338
|
else {
|
|
2329
2339
|
// 有删除数据的情况
|
|
@@ -2361,6 +2371,20 @@
|
|
|
2361
2371
|
}
|
|
2362
2372
|
}
|
|
2363
2373
|
}
|
|
2374
|
+
else {
|
|
2375
|
+
// step 2: 没有找到deletedIndex说明删除操作在最后一行
|
|
2376
|
+
/** @type {?} */
|
|
2377
|
+
var filterIndex_1 = this.filterIndexStore[this.filterIndexStore.length - 1];
|
|
2378
|
+
this.storeFormLinesData = this.storeFormLinesData.filter((/**
|
|
2379
|
+
* @param {?} item
|
|
2380
|
+
* @param {?} index
|
|
2381
|
+
* @return {?}
|
|
2382
|
+
*/
|
|
2383
|
+
function (item, index) {
|
|
2384
|
+
return index !== filterIndex_1;
|
|
2385
|
+
}));
|
|
2386
|
+
this.filterIndexStore.pop();
|
|
2387
|
+
}
|
|
2364
2388
|
}
|
|
2365
2389
|
}
|
|
2366
2390
|
else {
|