mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-20 22:35:06 +00:00
Move up and down with j and k
This commit is contained in:
@@ -8,8 +8,15 @@
|
||||
|
||||
<script>
|
||||
import marked from 'marked';
|
||||
import { useKeydown } from '../composition/useKeydown';
|
||||
|
||||
export default {
|
||||
setup({email}) {
|
||||
setup({email}, {emit}) {
|
||||
useKeydown([
|
||||
{key: 'k', fn: () => emit('changeEmail', {amount: -1})},
|
||||
{key: 'j', fn: () => emit('changeEmail', {amount: 1})}
|
||||
])
|
||||
|
||||
let emailMarkdown = marked(email.body);
|
||||
return {
|
||||
emailMarkdown
|
||||
|
||||
Reference in New Issue
Block a user