-
-
Notifications
You must be signed in to change notification settings - Fork 899
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,524 additions
and
861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 10 additions & 32 deletions
42
src/components/CodemirrorEditor/EditorHeader/EditDropdown.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,27 @@ | ||
<script setup> | ||
import { | ||
DropdownMenu, | ||
DropdownMenuContent, | ||
DropdownMenuItem, | ||
DropdownMenuTrigger, | ||
} from '@/components/ui/dropdown-menu' | ||
import { useStore } from '@/stores' | ||
const props = defineProps([`isOpen`, `clickTrigger`, `openDropdown`, `updateOpen`]) | ||
const store = useStore() | ||
const { | ||
toggleShowInsertFormDialog, | ||
toggleShowUploadImgDialog, | ||
} = store | ||
const { toggleShowInsertFormDialog, toggleShowUploadImgDialog } = store | ||
</script> | ||
|
||
<template> | ||
<DropdownMenu :open="props.isOpen" @update:open="props.updateOpen"> | ||
<DropdownMenuTrigger | ||
class="flex items-center p-2 px-4 hover:bg-gray-2 dark:hover:bg-stone-9" | ||
:class="{ | ||
'bg-gray-2': props.isOpen, | ||
'dark:bg-stone-9': props.isOpen, | ||
}" | ||
@click="props.clickTrigger()" | ||
@mouseenter="props.openDropdown()" | ||
> | ||
编辑 | ||
</DropdownMenuTrigger> | ||
<DropdownMenuContent align="start"> | ||
<DropdownMenuItem @click="toggleShowUploadImgDialog()"> | ||
<MenubarMenu> | ||
<MenubarTrigger> 编辑 </MenubarTrigger> | ||
<MenubarContent align="start"> | ||
<MenubarItem @click="toggleShowUploadImgDialog()"> | ||
<el-icon class="mr-2 h-4 w-4"> | ||
<ElIconUpload /> | ||
</el-icon> | ||
上传图片 | ||
</DropdownMenuItem> | ||
<DropdownMenuItem @click="toggleShowInsertFormDialog()"> | ||
</MenubarItem> | ||
<MenubarItem @click="toggleShowInsertFormDialog()"> | ||
<el-icon class="mr-2 h-4 w-4"> | ||
<ElIconGrid /> | ||
</el-icon> | ||
插入表格 | ||
</DropdownMenuItem> | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
</MenubarItem> | ||
</MenubarContent> | ||
</MenubarMenu> | ||
</template> |
Oops, something went wrong.