refactor: Add key prop to RunCode component in markdown-code-run.ts

This commit is contained in:
purocean
2024-06-18 22:58:57 +08:00
parent cd211d8122
commit 8b7a69a464
@@ -166,6 +166,7 @@ const RunCode = defineComponent({
onBeforeUnmount(() => {
appendLog = undefined
abort()
removeHook('CODE_RUNNER_CHANGE', refreshRunner)
})
@@ -214,6 +215,7 @@ const RunPlugin = (md: Markdown) => {
if (codeNode && Array.isArray(codeNode.children)) {
codeNode.children.push(h(RunCode, {
key: code,
code,
firstLine,
language: token.info,