fix(NumberKeyboard): incorrect extra key (#7150)

* fix(NumberKeyboard): incorrect extra key

* test(NumberKeyboard): add extra-key test case
This commit is contained in:
neverland
2020-09-10 17:09:37 +08:00
committed by GitHub
parent b3ee5430a0
commit 259dca7de1
3 changed files with 60 additions and 3 deletions
+3 -3
View File
@@ -107,13 +107,13 @@ export default createComponent({
if (extraKeys.length === 1) {
keys.push(
{ text: 0, wider: true },
{ text: extraKey[0], type: 'extra' }
{ text: extraKeys[0], type: 'extra' }
);
} else if (extraKeys.length === 2) {
keys.push(
{ text: extraKey[0], type: 'extra' },
{ text: extraKeys[0], type: 'extra' },
{ text: 0 },
{ text: extraKey[1], type: 'extra' }
{ text: extraKeys[1], type: 'extra' }
);
}