From 80c6af6e6dfc4e0673173514043138ee522fabdc Mon Sep 17 00:00:00 2001 From: Jimmykoki Date: Mon, 6 May 2024 16:49:53 -0700 Subject: [PATCH] feat(topic): add tab comp to topic06 (#255) * feat(topic): add tab component for topic6 * feat(topic): added tab comp for topic6 --------- Co-authored-by: Kiyoshi <44930252+Kiyo5hi@users.noreply.github.com> --- src/data.ts | 2 +- src/main.ts | 8 +- src/views/TopicsView.vue | 9 +- src/views/topics/GdpTopic06View.vue | 2247 ++++++++++++++------------- 4 files changed, 1185 insertions(+), 1081 deletions(-) diff --git a/src/data.ts b/src/data.ts index 62de2aa..7dd2e2d 100644 --- a/src/data.ts +++ b/src/data.ts @@ -557,7 +557,7 @@ export const topics: Topic[] = [ index: 6, snapshot: "images/snapshots/topic06.png", essay: "pdfs/topic06.pdf", - animationContributors: [ZEJIN_XU], + animationContributors: [ZEJIN_XU, JIANLIN_LI], essayContributors: [ZHIQIN_LU, XIANFU_LIU], captionContributors: [CHEN_XU], }, diff --git a/src/main.ts b/src/main.ts index 3125f13..0dfe307 100644 --- a/src/main.ts +++ b/src/main.ts @@ -22,7 +22,11 @@ createApp(App) .use(Antd) .directive("katex", (el, binding) => { const isDisplay = binding.arg === "display"; - katex.render(el.innerHTML, el, { displayMode: isDisplay }); + try { + katex.render(el.innerHTML, el, { displayMode: isDisplay }); + } catch (e) { + console.error("KaTeX rendering error:", e); + } }) .directive("tikz", (el) => { const scripts = el.innerHTML; @@ -34,3 +38,5 @@ createApp(App) el.appendChild(scriptTag); }) .mount("#app"); + +// 函数用于解码 HTML 实体 diff --git a/src/views/TopicsView.vue b/src/views/TopicsView.vue index d6b392b..302784f 100644 --- a/src/views/TopicsView.vue +++ b/src/views/TopicsView.vue @@ -1,6 +1,6 @@