Skip to content

Commit

Permalink
upd: optimize plantuml UX
Browse files Browse the repository at this point in the history
  • Loading branch information
purocean committed Mar 11, 2022
1 parent daaf1df commit 9237527
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/renderer/plugins/markdown-plantuml.ts
Original file line number Diff line number Diff line change
@@ -172,12 +172,14 @@ const Plantuml = defineComponent({
}

const load = debounce((val: string) => {
src.value = val
src.value = emptySrc
setTimeout(() => {
src.value = val
}, 0)
}, 1000)

watch(() => props.src, val => {
src.value = emptySrc
nextTick(() => load(val || ''))
load(val || '')
})

onMounted(() => {

0 comments on commit 9237527

Please sign in to comment.