|
@@ -1,7 +1,8 @@
|
|
|
<template>
|
|
|
<div class="hc-page-box">
|
|
|
<HcCard title="测试">
|
|
|
- 123456
|
|
|
+ <el-button type="primary" @click="hideClick">设置焦点</el-button>
|
|
|
+ <el-input type="text" id="xxxxx" @keyup.shift.up="keyupShiftUp" @keyup.shift.down="keyupShiftDown" @keyup.shift.left="keyupShiftLeft" @keyup.shift.right="keyupShiftRight"/>
|
|
|
</HcCard>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -13,4 +14,28 @@ import {ref, onMounted, nextTick} from "vue";
|
|
|
onMounted(()=> {
|
|
|
|
|
|
})
|
|
|
+
|
|
|
+const hideClick = () => {
|
|
|
+ document.getElementById('xxxxx').focus();
|
|
|
+}
|
|
|
+
|
|
|
+//上
|
|
|
+const keyupShiftUp = (event) => {
|
|
|
+ console.log(event)
|
|
|
+}
|
|
|
+
|
|
|
+//下
|
|
|
+const keyupShiftDown = (event) => {
|
|
|
+ console.log(event)
|
|
|
+}
|
|
|
+
|
|
|
+//左
|
|
|
+const keyupShiftLeft = (event) => {
|
|
|
+ console.log(event)
|
|
|
+}
|
|
|
+
|
|
|
+//右
|
|
|
+const keyupShiftRight = (event) => {
|
|
|
+ console.log(event)
|
|
|
+}
|
|
|
</script>
|