- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 54字
- 2021-07-02 19:57:23
Escape key
Having a close button for our modal is handy, but most people's instinctual action for closing a window is theEscapekey.
v-onis Vue's mechanism for listening to events and seems like a good candidate for this job. Adding thekeyup argument will trigger a handler callback afteranykey is pressed while this input is focused:
<input v-on:keyup="handler">
推薦閱讀
- PWA入門與實踐
- Java面向對象軟件開發
- 自己動手實現Lua:虛擬機、編譯器和標準庫
- JavaScript 網頁編程從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Python計算機視覺編程
- INSTANT Mercurial SCM Essentials How-to
- AutoCAD VBA參數化繪圖程序開發與實戰編碼
- Java:High-Performance Apps with Java 9
- C語言開發基礎教程(Dev-C++)(第2版)
- Learning Apache Karaf
- PHP編程基礎與實踐教程
- 新印象:解構UI界面設計
- 計算機應用基礎(Windows 7+Office 2010)
- Python輕松學:爬蟲、游戲與架站
- Erlang編程指南