fantasy-ngzorro 1.3.7 → 1.3.8
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 +101 -91
- 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 +98 -92
- package/esm5/hd-form-lines/hd-form-lines.component.js +102 -92
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +97 -91
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +101 -91
- 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
|
@@ -2076,97 +2076,92 @@
|
|
|
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
|
-
|
|
2079
|
+
switch (event.key) {
|
|
2080
|
+
case 'ArrowUp':
|
|
2081
|
+
if (this.activeDom instanceof ngZorroAntd.NzSelectComponent && this.activeSelectedComponentOpen) {
|
|
2082
|
+
return;
|
|
2083
|
+
}
|
|
2084
|
+
if (this.activeDomX !== 0) {
|
|
2085
|
+
console.log('执行过程8');
|
|
2086
|
+
this.focusDom(this.activeDomX - 1, this.activeDomY);
|
|
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);
|
|
2101
2112
|
}
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
+
}
|
|
2114
|
+
else if (this.activeDomX === this.collectDomList.length - 1) {
|
|
2115
|
+
console.log('执行过程qqq');
|
|
2116
|
+
this.addNewLineAndFocus();
|
|
2117
|
+
}
|
|
2118
|
+
break;
|
|
2119
|
+
case 'Escape':
|
|
2120
|
+
if (this.activeDom instanceof ngZorroAntd.NzSelectComponent) {
|
|
2121
|
+
/** @type {?} */
|
|
2122
|
+
var nowActiveDom_1 = (/** @type {?} */ (this.activeDom));
|
|
2123
|
+
setTimeout((/**
|
|
2124
|
+
* @return {?}
|
|
2125
|
+
*/
|
|
2126
|
+
function () {
|
|
2127
|
+
_this.activeSelectedComponentOpen = nowActiveDom_1.open;
|
|
2113
2128
|
if (_this.activeSelectedComponentOpen === false) {
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
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');
|
|
2129
|
+
if (nowActiveDom_1.nzSelectService.mode === 'multiple') {
|
|
2130
|
+
setTimeout((/**
|
|
2131
|
+
* @return {?}
|
|
2132
|
+
*/
|
|
2133
|
+
function () {
|
|
2134
|
+
console.log('执行过程11');
|
|
2144
2135
|
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
2145
|
-
}
|
|
2136
|
+
}), 0);
|
|
2146
2137
|
}
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2138
|
+
else {
|
|
2139
|
+
console.log('执行过程12');
|
|
2140
|
+
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
}), 0);
|
|
2144
|
+
}
|
|
2145
|
+
break;
|
|
2146
|
+
default:
|
|
2147
|
+
// 如果当前聚焦的是选择框,且键入0-9a-zA-Z,则弹出
|
|
2148
|
+
if (this.activeDom instanceof ngZorroAntd.NzSelectComponent && this.activeSelectedComponentOpen === false && /^[0-9a-zA-Z]$/.test(event.key)) {
|
|
2149
|
+
/** @type {?} */
|
|
2150
|
+
var dom = this.activeDom;
|
|
2151
|
+
dom.nzOpen = true;
|
|
2152
|
+
this.activeSelectedComponentOpen = true;
|
|
2153
|
+
// // TODO:这里暂时注释,不能直接带入键入值,这样会导致输入中文的时候带入英文字符,不符合预期
|
|
2154
|
+
// dom.nzSelectTopControlComponent.inputValue = event.key;
|
|
2155
|
+
// // 获取 input 元素
|
|
2156
|
+
// const inputElement = dom.nzSelectTopControlComponent.inputElement.nativeElement;
|
|
2157
|
+
// setTimeout(() => {
|
|
2158
|
+
// // 触发输入事件,以确保 Angular 检测到值的变化
|
|
2159
|
+
// const eventInput = new Event('input', { bubbles: true });
|
|
2160
|
+
// inputElement.dispatchEvent(eventInput);
|
|
2161
|
+
// }, 0);
|
|
2162
|
+
}
|
|
2163
|
+
break;
|
|
2164
|
+
}
|
|
2170
2165
|
};
|
|
2171
2166
|
/**
|
|
2172
2167
|
* 根据在初始dom下标和数据集 获取在collectDomList中的下标
|
|
@@ -2596,6 +2591,21 @@
|
|
|
2596
2591
|
});
|
|
2597
2592
|
this.newLine = this.newLineItem();
|
|
2598
2593
|
};
|
|
2594
|
+
/**
|
|
2595
|
+
* @return {?}
|
|
2596
|
+
*/
|
|
2597
|
+
HdFormLinesComponent.prototype.delayJumpToNextInput = /**
|
|
2598
|
+
* @return {?}
|
|
2599
|
+
*/
|
|
2600
|
+
function () {
|
|
2601
|
+
var _this = this;
|
|
2602
|
+
setTimeout((/**
|
|
2603
|
+
* @return {?}
|
|
2604
|
+
*/
|
|
2605
|
+
function () {
|
|
2606
|
+
_this.jumpToNextInput(_this.activeDomX, _this.activeDomY);
|
|
2607
|
+
}), 0);
|
|
2608
|
+
};
|
|
2599
2609
|
/**
|
|
2600
2610
|
* 定义空的newLineItem 结构
|
|
2601
2611
|
*/
|
|
@@ -2641,7 +2651,7 @@
|
|
|
2641
2651
|
*/
|
|
2642
2652
|
function (value) {
|
|
2643
2653
|
if (item.type === FormLineType.Select && value !== null) {
|
|
2644
|
-
_this.
|
|
2654
|
+
_this.delayJumpToNextInput();
|
|
2645
2655
|
}
|
|
2646
2656
|
_this.triggerEvent(item.onChangeEvent, value, formGroupSubmit);
|
|
2647
2657
|
}));
|
|
@@ -2653,7 +2663,7 @@
|
|
|
2653
2663
|
*/
|
|
2654
2664
|
function (value) {
|
|
2655
2665
|
if (item.type === FormLineType.Select && value !== null) {
|
|
2656
|
-
_this.
|
|
2666
|
+
_this.delayJumpToNextInput();
|
|
2657
2667
|
}
|
|
2658
2668
|
_this.triggerEvent(item.onChangeEvent, value, formGroupSubmit);
|
|
2659
2669
|
}));
|
|
@@ -2730,7 +2740,7 @@
|
|
|
2730
2740
|
*/
|
|
2731
2741
|
function (value) {
|
|
2732
2742
|
if (item.type === FormLineType.Select && value !== null) {
|
|
2733
|
-
_this.
|
|
2743
|
+
_this.delayJumpToNextInput();
|
|
2734
2744
|
}
|
|
2735
2745
|
_this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
2736
2746
|
}));
|
|
@@ -2742,7 +2752,7 @@
|
|
|
2742
2752
|
*/
|
|
2743
2753
|
function (value) {
|
|
2744
2754
|
if (item.type === FormLineType.Select && value !== null) {
|
|
2745
|
-
_this.
|
|
2755
|
+
_this.delayJumpToNextInput();
|
|
2746
2756
|
}
|
|
2747
2757
|
_this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
2748
2758
|
}));
|