How to destroy the document.onkeydown event bound by input?

bind the focus event to the input of ipt1 in class, and another input will also trigger this focus,. How to destroy it?

<el-input class="ipt1" type="textarea" @focus="focusIpt()"></el-input> 
<el-input class="ipt2" type="textarea"></el-input>
<script>
    focusIpt(){
        let enterEvent = function(e){
              ... // do something  
        }
        document.onkeydown = enterEvent
    }
</script>

Apr.22,2021

when you listen for events, write as standard

document.addEventListener('keydown', fun);
document.removeEventListener('keydown', fun);//

document.onkeydown = undefined

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35295-e4bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35295-e4bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?