This commit is contained in:
2023-11-22 18:00:44 +08:00
parent 8e50a9af37
commit dd1503c4a3
2 changed files with 8 additions and 6 deletions

View File

@@ -217,15 +217,15 @@ export default {
cursor: pointer; cursor: pointer;
padding: 0; padding: 0;
box-sizing: content-box; box-sizing: content-box;
&:hover
color: #333;
background-color: #d6d6d6;
border-color: #adadad;
&:active &:active
transform: scale(.98); transform: scale(.98);
color: #333; color: #333;
background-color: #d4d4d4; background-color: #d4d4d4;
border-color: #8c8c8c; border-color: #8c8c8c;
&:hover
color: #333;
background-color: #d6d6d6;
border-color: #adadad;
& .hg-button-bksp & .hg-button-bksp
flex: 65 1 0%; flex: 65 1 0%;
background-image: url("../images/backspace.svg"); background-image: url("../images/backspace.svg");

View File

@@ -103,7 +103,7 @@ export default {
}, 0) }, 0)
}, },
onKeyPress (button) { onKeyPress (button) {
if (button === '{lock}' || button === '{shift}' || button === '{change}' || button === '{bksp}' || button === '{clear}') { if (button === '{lock}' || button === '{shift}' || button === '{change}' || button === '{bksp}' || button === '{clear}' || button === '{bksp}') {
this.$nextTick(() => { this.$nextTick(() => {
this.inputEle.focus() this.inputEle.focus()
}) })
@@ -114,7 +114,9 @@ export default {
if (button === '{clear}') { if (button === '{clear}') {
this.inputValue = '' this.inputValue = ''
} }
// console.log('onKeyPress', button) if (button === '{bksp}') {
this.inputValue = this.inputValue.substring(0, this.inputValue.length - 1)
}
} }
} }
} }