From 047cea20b9d3dc2d2166a84e5550f29987c46c33 Mon Sep 17 00:00:00 2001 From: Phoenix <64720302+Concur-max@users.noreply.github.com> Date: Mon, 9 Jun 2025 11:44:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor(editor):=20=E5=B0=86=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=A0=8F=E9=85=8D=E7=BD=AE=E4=BB=8Ereactive=E6=94=B9=E4=B8=BAr?= =?UTF-8?q?ef=E5=B9=B6=E8=B0=83=E6=95=B4=E8=A1=A8=E6=83=85=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将CustomEditor中的navs从reactive改为ref以提高性能 调整MeEditorEmoticon的样式,包括间距改为内边距、添加悬停背景色,并移除表情缩放效果 --- src/components/editor/CustomEditor.vue | 2 +- src/components/editor/MeEditorEmoticon.vue | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/editor/CustomEditor.vue b/src/components/editor/CustomEditor.vue index 30b43ec..b22e712 100644 --- a/src/components/editor/CustomEditor.vue +++ b/src/components/editor/CustomEditor.vue @@ -57,7 +57,7 @@ const editorDraftStore = useEditorDraftStore() const indexName = computed(() => dialogueStore.index_name) // 工具栏配置 -const navs = reactive([ +const navs = ref([ { title: '图片', icon: markRaw(Pic), diff --git a/src/components/editor/MeEditorEmoticon.vue b/src/components/editor/MeEditorEmoticon.vue index a88e65c..4cd9c3e 100644 --- a/src/components/editor/MeEditorEmoticon.vue +++ b/src/components/editor/MeEditorEmoticon.vue @@ -186,16 +186,20 @@ const onSendEmoticon = (type: any, value: any, img = '') => { flex-wrap: wrap; .option{ - margin: 7px; + padding: 7px; + border-radius: 4px; + &:hover { + background-color: #F2F2F2; + } :deep(.emoji){ height: 22px; width: 22px; user-select: none; transition: all 0.5s; - &:hover { - transform: scale(1.5); - } + // &:hover { + // transform: scale(1.5); + // } } } }