From 335be6bb13aa30cca7944e3d91aba690a24d7ab1 Mon Sep 17 00:00:00 2001 From: frostime Date: Mon, 7 Oct 2024 21:33:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E6=98=BE=E7=A4=BA=20emoj?= =?UTF-8?q?i=20=E7=9A=84=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/select-icon.tsx | 8 ++++---- vite.config.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/select-icon.tsx b/src/components/select-icon.tsx index cd606a7..4ee999a 100644 --- a/src/components/select-icon.tsx +++ b/src/components/select-icon.tsx @@ -22,12 +22,12 @@ const SelectIcons = (props: IProps) => { const i18n = inject('i18n'); - const ALLOWED_EMOJI_GROUP = ['object', 'symbols', 'flags', 'nature', 'people', 'activity', 'travel']; - const EmojisGroups = (window.siyuan.emojis as ImojiGroup[]).filter(emoji => ALLOWED_EMOJI_GROUP.includes(emoji.id)) - .sort((a, b) => ALLOWED_EMOJI_GROUP.indexOf(a.id) - ALLOWED_EMOJI_GROUP.indexOf(b.id)); + const ALLOWED_EMOJI_GROUP = ['activity', 'travel', 'people', 'nature', 'food', 'symbols', 'object', 'flags']; + let EmojisGroups = (window.siyuan.emojis as ImojiGroup[]).filter(emoji => ALLOWED_EMOJI_GROUP.includes(emoji.id)); + EmojisGroups.sort((a, b) => ALLOWED_EMOJI_GROUP.indexOf(a.id) - ALLOWED_EMOJI_GROUP.indexOf(b.id)) const emojiUnicodes = EmojisGroups.map(group => group.items.map(item => item.unicode)).flat(); - const SIZE = '20px' + const SIZE = '20px'; const AllSymbols = () => (
diff --git a/vite.config.ts b/vite.config.ts index 53f3c4b..0183a40 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,11 +11,12 @@ import vitePluginYamlI18n from './yaml-plugin'; export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), ''); const isSrcmap = env.VITE_SOURCEMAP === 'inline'; - const isDev = mode === 'development'; + const isDev = env.NODE_ENV === 'development'; const distDir = isDev ? "dev" : "dist"; console.log("isDev=>", isDev); console.log("isSrcmap=>", isSrcmap); + console.log("distDir=>", distDir); return { resolve: {