fantasy-ngzorro 1.3.5 → 1.3.7
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 +89 -83
- 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 +90 -84
- package/esm5/hd-form-lines/hd-form-lines.component.js +90 -84
- package/fesm2015/fantasy-ngzorro.js +89 -83
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +89 -83
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/package.json +1 -1
|
@@ -1759,7 +1759,7 @@
|
|
|
1759
1759
|
return;
|
|
1760
1760
|
}
|
|
1761
1761
|
// 如果是最后一个可输入元素,新增行
|
|
1762
|
-
if (x === this.collectDomList.length - 1 && y === this.collectDomList[0].length - 1) {
|
|
1762
|
+
if (!(this.activeDom instanceof ngZorroAntd.NzSelectComponent) && x === this.collectDomList.length - 1 && y === this.collectDomList[0].length - 1) {
|
|
1763
1763
|
this.addNewLineAndFocus();
|
|
1764
1764
|
}
|
|
1765
1765
|
else {
|
|
@@ -2076,91 +2076,97 @@
|
|
|
2076
2076
|
if (this.activeDomX === null || this.activeDomY === null) {
|
|
2077
2077
|
return;
|
|
2078
2078
|
}
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
// } else if (this.activeDomX === this.collectDomList.length - 1) {
|
|
2114
|
-
// console.log('执行过程qqq');
|
|
2115
|
-
// this.addNewLineAndFocus();
|
|
2116
|
-
// }
|
|
2117
|
-
break;
|
|
2118
|
-
case 'Escape':
|
|
2119
|
-
if (this.activeDom instanceof ngZorroAntd.NzSelectComponent) {
|
|
2120
|
-
/** @type {?} */
|
|
2121
|
-
var nowActiveDom_1 = (/** @type {?} */ (this.activeDom));
|
|
2122
|
-
setTimeout((/**
|
|
2123
|
-
* @return {?}
|
|
2124
|
-
*/
|
|
2125
|
-
function () {
|
|
2126
|
-
_this.activeSelectedComponentOpen = nowActiveDom_1.open;
|
|
2079
|
+
setTimeout((/**
|
|
2080
|
+
* @return {?}
|
|
2081
|
+
*/
|
|
2082
|
+
function () {
|
|
2083
|
+
switch (event.key) {
|
|
2084
|
+
case 'ArrowUp':
|
|
2085
|
+
if (_this.activeDom instanceof ngZorroAntd.NzSelectComponent && _this.activeSelectedComponentOpen) {
|
|
2086
|
+
return;
|
|
2087
|
+
}
|
|
2088
|
+
if (_this.activeDomX !== 0) {
|
|
2089
|
+
console.log('执行过程8');
|
|
2090
|
+
_this.focusDom(_this.activeDomX - 1, _this.activeDomY);
|
|
2091
|
+
}
|
|
2092
|
+
break;
|
|
2093
|
+
case 'ArrowDown':
|
|
2094
|
+
// 判断是否在最后一行,如果在最后一行,直接+行翻页
|
|
2095
|
+
if (_this.activeDom instanceof ngZorroAntd.NzSelectComponent && _this.activeSelectedComponentOpen) {
|
|
2096
|
+
return;
|
|
2097
|
+
}
|
|
2098
|
+
if (_this.activeDomX !== _this.collectDomList.length - 1) {
|
|
2099
|
+
console.log('执行过程9');
|
|
2100
|
+
_this.focusDom(_this.activeDomX + 1, _this.activeDomY);
|
|
2101
|
+
}
|
|
2102
|
+
break;
|
|
2103
|
+
case 'ArrowLeft':
|
|
2104
|
+
_this.jumpToPrevInput(_this.activeDomX, _this.activeDomY);
|
|
2105
|
+
break;
|
|
2106
|
+
case 'ArrowRight':
|
|
2107
|
+
_this.jumpToNextInput(_this.activeDomX, _this.activeDomY);
|
|
2108
|
+
break;
|
|
2109
|
+
case 'Enter':
|
|
2110
|
+
console.log('this.activeDom', _this.activeDom);
|
|
2111
|
+
if (_this.activeDom instanceof ngZorroAntd.NzSelectComponent) {
|
|
2112
|
+
_this.activeSelectedComponentOpen = _this.activeDom.open;
|
|
2127
2113
|
if (_this.activeSelectedComponentOpen === false) {
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2114
|
+
console.log('执行过程10');
|
|
2115
|
+
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
else if (_this.activeDomX === _this.collectDomList.length - 1) {
|
|
2119
|
+
console.log('执行过程qqq');
|
|
2120
|
+
_this.addNewLineAndFocus();
|
|
2121
|
+
}
|
|
2122
|
+
break;
|
|
2123
|
+
case 'Escape':
|
|
2124
|
+
if (_this.activeDom instanceof ngZorroAntd.NzSelectComponent) {
|
|
2125
|
+
/** @type {?} */
|
|
2126
|
+
var nowActiveDom_1 = (/** @type {?} */ (_this.activeDom));
|
|
2127
|
+
setTimeout((/**
|
|
2128
|
+
* @return {?}
|
|
2129
|
+
*/
|
|
2130
|
+
function () {
|
|
2131
|
+
_this.activeSelectedComponentOpen = nowActiveDom_1.open;
|
|
2132
|
+
if (_this.activeSelectedComponentOpen === false) {
|
|
2133
|
+
if (nowActiveDom_1.nzSelectService.mode === 'multiple') {
|
|
2134
|
+
setTimeout((/**
|
|
2135
|
+
* @return {?}
|
|
2136
|
+
*/
|
|
2137
|
+
function () {
|
|
2138
|
+
console.log('执行过程11');
|
|
2139
|
+
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
2140
|
+
}), 0);
|
|
2141
|
+
}
|
|
2142
|
+
else {
|
|
2143
|
+
console.log('执行过程12');
|
|
2134
2144
|
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
|
-
else {
|
|
2138
|
-
console.log('执行过程12');
|
|
2139
|
-
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
2145
|
+
}
|
|
2140
2146
|
}
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
}
|
|
2147
|
+
}), 0);
|
|
2148
|
+
}
|
|
2149
|
+
break;
|
|
2150
|
+
default:
|
|
2151
|
+
// 如果当前聚焦的是选择框,且键入0-9a-zA-Z,则弹出
|
|
2152
|
+
if (_this.activeDom instanceof ngZorroAntd.NzSelectComponent && _this.activeSelectedComponentOpen === false && /^[0-9a-zA-Z]$/.test(event.key)) {
|
|
2153
|
+
/** @type {?} */
|
|
2154
|
+
var dom = _this.activeDom;
|
|
2155
|
+
dom.nzOpen = true;
|
|
2156
|
+
_this.activeSelectedComponentOpen = true;
|
|
2157
|
+
// // TODO:这里暂时注释,不能直接带入键入值,这样会导致输入中文的时候带入英文字符,不符合预期
|
|
2158
|
+
// dom.nzSelectTopControlComponent.inputValue = event.key;
|
|
2159
|
+
// // 获取 input 元素
|
|
2160
|
+
// const inputElement = dom.nzSelectTopControlComponent.inputElement.nativeElement;
|
|
2161
|
+
// setTimeout(() => {
|
|
2162
|
+
// // 触发输入事件,以确保 Angular 检测到值的变化
|
|
2163
|
+
// const eventInput = new Event('input', { bubbles: true });
|
|
2164
|
+
// inputElement.dispatchEvent(eventInput);
|
|
2165
|
+
// }, 0);
|
|
2166
|
+
}
|
|
2167
|
+
break;
|
|
2168
|
+
}
|
|
2169
|
+
}), 0);
|
|
2164
2170
|
};
|
|
2165
2171
|
/**
|
|
2166
2172
|
* 根据在初始dom下标和数据集 获取在collectDomList中的下标
|