Skip to content

Commit

Permalink
fix: 未替换版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
imzbf committed Nov 12, 2024
1 parent ace31f1 commit b22d2d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/[lang]/demo/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { useStore } from '@/store';
import { version as EDITOR_VERSION } from '@/package.json';
import pack from '@/package.json';
import mdEN from '@/public/demo-en-US.md';
import mdCN from '@/public/demo-zh-CN.md';
Expand All @@ -31,12 +31,12 @@ const editorId = 'demo-preview';
const mdText = ref(
replaceTemplate(store.lang === 'en-US' ? mdEN : mdCN, {
EDITOR_VERSION,
EDITOR_VERSION: pack.dependencies['md-editor-v3'].replace('^', ''),
})
);
const queryMd = () => {
mdText.value = replaceTemplate(store.lang === 'en-US' ? mdEN : mdCN, {
EDITOR_VERSION,
EDITOR_VERSION: pack.dependencies['md-editor-v3'].replace('^', ''),
});
};
watch(() => store.lang, queryMd);
Expand Down

0 comments on commit b22d2d5

Please sign in to comment.