From 92982785074a35a05a5c2ac234092dad460e5db6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?wifi=E6=AD=AAf?= <1402772884@qq.com>
Date: Fri, 21 Feb 2025 17:59:10 +0800
Subject: [PATCH] =?UTF-8?q?fix(mini-markdown-editor):=20=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?emoji=E7=9A=84=E5=A4=9A=E8=AF=AD=E8=A8=80=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/mini-markdown-editor/src/App.tsx | 2 +-
.../src/components/Toolbar/Emoji.tsx | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/packages/mini-markdown-editor/src/App.tsx b/packages/mini-markdown-editor/src/App.tsx
index a3d04a8..cb660e0 100644
--- a/packages/mini-markdown-editor/src/App.tsx
+++ b/packages/mini-markdown-editor/src/App.tsx
@@ -193,7 +193,7 @@ const App: FC = () => {
{/* */}
{
- const { theme } = useGlobalConfig();
+ const { theme, locale: globalLocal } = useGlobalConfig();
+
+ const locale = useMemo(() => {
+ return globalLocal === "cn" ? "zh" : globalLocal;
+ }, [globalLocal]);
// Emoji 选择器
const EmojiPickerComponent = useMemo(
@@ -15,11 +19,10 @@ const Emoji: FC = () => {
InsertEmojiEvent(emoji)}
- locale="zh"
+ locale={locale}
theme={theme === "dark" ? "dark" : "light"}
previewPosition="none"
searchPosition="top"
- // skinTonePosition="none"
/>
),
[theme],
--
Gitee