Skip to content

Commit

Permalink
开发模式下不显示评论
Browse files Browse the repository at this point in the history
nothing
  • Loading branch information
jinzhongjia committed Jan 9, 2024
1 parent 130e783 commit e9d2ac8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions learn/.vitepress/theme/giscus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { defineComponent, h } from "vue";
import { useData, useRoute } from "vitepress";
import Giscus from "@giscus/vue";

const is_dev = process.env.NODE_ENV === "development";

export default defineComponent({
setup() {
const route = useRoute();
const { isDark } = useData();

return () =>
return () =>is_dev? h("div"):
h(
"div",
{
Expand All @@ -30,6 +32,7 @@ export default defineComponent({
lang: "zh-CN",
term: route.path,
}),
);
)
;
},
});

0 comments on commit e9d2ac8

Please sign in to comment.