From 3ebceb8370d3aaa53dc15ec745d738b137a57a35 Mon Sep 17 00:00:00 2001 From: YangFong Date: Sat, 24 Aug 2024 19:22:52 +0800 Subject: [PATCH] feat: update trigger of dropdown (#349) --- src/App.vue | 7 +- .../EditorHeader/EditDropdown.vue | 19 ++- .../EditorHeader/FileDropdown.vue | 19 ++- .../EditorHeader/HelpDropdown.vue | 19 ++- .../EditorHeader/StyleDropdown.vue | 19 ++- .../CodemirrorEditor/EditorHeader/index.vue | 110 ++++++++++++++---- 6 files changed, 145 insertions(+), 48 deletions(-) diff --git a/src/App.vue b/src/App.vue index 27b9142..ce01a90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -17,6 +17,11 @@ body, padding: 0; } +// 抵消下拉菜单开启时带来的样式 +body { + pointer-events: initial !important; +} + ::-webkit-scrollbar { width: 6px; height: 6px; @@ -78,6 +83,4 @@ body, .el-icon.el-color-picker__icon.is-icon-arrow-down { position: absolute; } - - diff --git a/src/components/CodemirrorEditor/EditorHeader/EditDropdown.vue b/src/components/CodemirrorEditor/EditorHeader/EditDropdown.vue index 2d96412..5e7e07d 100644 --- a/src/components/CodemirrorEditor/EditorHeader/EditDropdown.vue +++ b/src/components/CodemirrorEditor/EditorHeader/EditDropdown.vue @@ -8,6 +8,8 @@ import { import { useStore } from '@/stores' +const props = defineProps([`isOpen`, `clickTrigger`, `openDropdown`, `updateOpen`]) + const store = useStore() const { @@ -17,14 +19,19 @@ const {