fantasy-ngzorro 1.3.6 → 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 +87 -82
- 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 +88 -83
- package/esm5/hd-form-lines/hd-form-lines.component.js +88 -83
- package/fesm2015/fantasy-ngzorro.js +87 -82
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +87 -82
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/package.json +1 -1
|
@@ -2076,92 +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
|
-
break;
|
|
2089
|
-
case 'ArrowDown':
|
|
2090
|
-
// 判断是否在最后一行,如果在最后一行,直接+行翻页
|
|
2091
|
-
if (this.activeDom instanceof ngZorroAntd.NzSelectComponent && this.activeSelectedComponentOpen) {
|
|
2092
|
-
return;
|
|
2093
|
-
}
|
|
2094
|
-
if (this.activeDomX !== this.collectDomList.length - 1) {
|
|
2095
|
-
console.log('执行过程9');
|
|
2096
|
-
this.focusDom(this.activeDomX + 1, this.activeDomY);
|
|
2097
|
-
}
|
|
2098
|
-
break;
|
|
2099
|
-
case 'ArrowLeft':
|
|
2100
|
-
this.jumpToPrevInput(this.activeDomX, this.activeDomY);
|
|
2101
|
-
break;
|
|
2102
|
-
case 'ArrowRight':
|
|
2103
|
-
this.jumpToNextInput(this.activeDomX, this.activeDomY);
|
|
2104
|
-
break;
|
|
2105
|
-
case 'Enter':
|
|
2106
|
-
console.log('this.activeDom', this.activeDom);
|
|
2107
|
-
if (this.activeDom instanceof ngZorroAntd.NzSelectComponent) {
|
|
2108
|
-
this.activeSelectedComponentOpen = this.activeDom.open;
|
|
2109
|
-
if (this.activeSelectedComponentOpen === false) {
|
|
2110
|
-
console.log('执行过程10');
|
|
2111
|
-
this.focusDom(this.activeDomX, this.activeDomY);
|
|
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;
|
|
2112
2087
|
}
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
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;
|
|
2128
2113
|
if (_this.activeSelectedComponentOpen === false) {
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
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');
|
|
2135
2144
|
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
2136
|
-
}
|
|
2137
|
-
}
|
|
2138
|
-
else {
|
|
2139
|
-
console.log('执行过程12');
|
|
2140
|
-
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
2145
|
+
}
|
|
2141
2146
|
}
|
|
2142
|
-
}
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
}
|
|
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);
|
|
2165
2170
|
};
|
|
2166
2171
|
/**
|
|
2167
2172
|
* 根据在初始dom下标和数据集 获取在collectDomList中的下标
|