fix: provide callback for focus-editor injection (#435)
parent
39ed6bffec
commit
1cd86996ab
|
@ -7,7 +7,7 @@ const props = defineProps<{
|
||||||
command?: boolean
|
command?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const focusEditor = inject<() => void>('focus-editor')
|
const focusEditor = inject<typeof noop>('focus-editor', noop)
|
||||||
|
|
||||||
const { details, command } = $(props)
|
const { details, command } = $(props)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ const reply = () => {
|
||||||
if (!checkLogin())
|
if (!checkLogin())
|
||||||
return
|
return
|
||||||
if (details) {
|
if (details) {
|
||||||
focusEditor?.()
|
focusEditor()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const { key, draft } = getReplyDraft(status)
|
const { key, draft } = getReplyDraft(status)
|
||||||
|
|
Loading…
Reference in New Issue