라이브 에디터 콜아웃 줄 삭제 수정
This commit is contained in:
@@ -33,7 +33,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['commit'])
|
||||
const emit = defineEmits(['commit', 'delete-line', 'insert-below', 'merge-with-previous', 'leave-block'])
|
||||
|
||||
/**
|
||||
* 콜아웃 마크다운 줄을 반영한다.
|
||||
@@ -62,6 +62,15 @@ const commitCallout = (body) => {
|
||||
const onBodyCommit = (body) => {
|
||||
commitCallout(body)
|
||||
}
|
||||
|
||||
/**
|
||||
* 콜아웃 아래로 이탈한다.
|
||||
* @param {Object} payload - 이탈 페이로드
|
||||
* @returns {void}
|
||||
*/
|
||||
const onExitBelow = (payload) => {
|
||||
emit('insert-below', payload)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -87,6 +96,10 @@ const onBodyCommit = (body) => {
|
||||
:source-line="bodySourceLine"
|
||||
:model-value="modelValue"
|
||||
@commit="onBodyCommit"
|
||||
@delete-line="emit('delete-line', $event)"
|
||||
@insert-below="onExitBelow"
|
||||
@merge-with-previous="emit('merge-with-previous', $event)"
|
||||
@leave-block="emit('leave-block', $event)"
|
||||
/>
|
||||
</div>
|
||||
</ProseCallout>
|
||||
|
||||
Reference in New Issue
Block a user