@gm-pc/react 1.17.0-beta.1 → 1.17.0-beta.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-pc/react",
|
|
3
|
-
"version": "1.17.0-beta.
|
|
3
|
+
"version": "1.17.0-beta.4",
|
|
4
4
|
"description": "观麦前端基础组件库",
|
|
5
5
|
"author": "liyatang <liyatang@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/gmfe/gm-pc#readme",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@gm-common/hooks": "^2.10.0",
|
|
26
26
|
"@gm-common/tool": "^2.10.0",
|
|
27
|
-
"@gm-pc/locales": "^1.17.0-beta.
|
|
27
|
+
"@gm-pc/locales": "^1.17.0-beta.4",
|
|
28
28
|
"big.js": "^6.0.1",
|
|
29
29
|
"classnames": "^2.2.5",
|
|
30
30
|
"lodash": "^4.17.19",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"react-router-dom": "^5.2.0",
|
|
49
49
|
"react-window": "^1.8.5"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "9a9c98bba54ce73bdc07dc3023a5fece1980f8ea"
|
|
52
52
|
}
|
|
@@ -113,26 +113,15 @@ const AutoComplete = forwardRef<AutoCompleteRef, AutoCompleteProps>((props, ref)
|
|
|
113
113
|
return
|
|
114
114
|
}
|
|
115
115
|
let index = willActiveIndex
|
|
116
|
-
if (event.key === 'ArrowUp' && index === 0) {
|
|
117
|
-
event.preventDefault()
|
|
118
|
-
onKeyDown && onKeyDown(event)
|
|
119
|
-
return
|
|
120
|
-
}
|
|
121
|
-
if (event.key === 'ArrowDown' && index === options.length - 1) {
|
|
122
|
-
event.preventDefault()
|
|
123
|
-
onKeyDown && onKeyDown(event)
|
|
124
|
-
return
|
|
125
|
-
}
|
|
126
|
-
event.preventDefault()
|
|
127
116
|
if (event.key === 'ArrowUp') {
|
|
128
|
-
index
|
|
117
|
+
index--
|
|
129
118
|
} else if (event.key === 'ArrowDown') {
|
|
130
|
-
index
|
|
119
|
+
index++
|
|
131
120
|
}
|
|
132
121
|
if (index < 0) {
|
|
133
|
-
index = 0
|
|
134
|
-
} else if (index > options.length - 1) {
|
|
135
122
|
index = options.length - 1
|
|
123
|
+
} else if (index > options.length - 1) {
|
|
124
|
+
index = 0
|
|
136
125
|
}
|
|
137
126
|
setWillActiveIndex(index)
|
|
138
127
|
}
|