Skip to content

Commit

Permalink
fix: the issue that the update timing is incorrect (#5)
Browse files Browse the repository at this point in the history
修复因为更新内容时机导致 Console 编辑内容界面频繁更新缓存的问题。

/kind bug

Fixes halo-dev/halo#3259


可测试 JAR 包:[plugin-bytemd-1.0.0-SNAPSHOT.jar.zip](https://github.com/halo-sigs/plugin-bytemd/files/10693022/plugin-bytemd-1.0.0-SNAPSHOT.jar.zip)

```release-note
修复因为更新内容时机导致 Console 编辑内容界面频繁更新缓存的问题。
```
  • Loading branch information
ruibaby authored Feb 9, 2023
1 parent 0eb5844 commit f7c896f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 42 deletions.
5 changes: 4 additions & 1 deletion console/src/components/bytemd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ const emit = defineEmits<{
const handleChange = (v: string) => {
emit("update:raw", v);
emit("update", v);
if (v !== props.raw) {
emit("update", v);
}
const processor = getProcessor({ plugins: plugins }).processSync(props.raw);
Expand Down
Loading

0 comments on commit f7c896f

Please sign in to comment.