Change className&mousedown

This commit is contained in:
Seviche CC 2023-03-24 21:47:55 +08:00
parent d71878fc17
commit 9dfd5d34d9
Signed by: SevicheCC
GPG key ID: C577000000000000
3 changed files with 6 additions and 6 deletions

View file

@ -3,7 +3,7 @@ import { SlashProvider } from '@milkdown/plugin-slash'
import { onMounted, onUnmounted, ref, watch } from 'vue'
import { usePluginViewContext } from '@prosemirror-adapter/vue'
import type { VNodeRef } from 'vue'
import { useAddCodeBlock, useToggleBold } from '../../composables/quickCommands'
import { useAddCodeBlock, useToggleBold } from '../../composables/commands'
let tooltipProvider: SlashProvider
@ -33,8 +33,8 @@ const { toggleBold } = useToggleBold()
<template>
<div ref="divRef">
<button
className="text-gray-600 bg-slate-200 px-2 py-1 rounded-lg hover:bg-slate-300 border hover:text-gray-900"
@mousedown="addCodeBlock"
class="text-gray-600 bg-slate-200 px-2 py-1 rounded-lg hover:bg-slate-300 border hover:text-gray-900"
@click="addCodeBlock"
>
Code Block
</button>

View file

@ -5,7 +5,7 @@ import { usePluginViewContext } from '@prosemirror-adapter/vue'
import { onMounted, onUnmounted, ref, watch } from 'vue'
import type { VNodeRef } from 'vue'
import { useAddCodeBlock, useToggleBold } from '../../composables/quickCommands'
import { useAddCodeBlock, useToggleBold } from '../../composables/commands'
const { view, prevState } = usePluginViewContext()
const divRef = ref<VNodeRef>()
@ -41,8 +41,8 @@ const { addCodeBlock } = useAddCodeBlock()
Bold
</button>
<button
className="text-gray-600 bg-slate-200 px-2 py-1 rounded-lg hover:bg-slate-300 border hover:text-gray-900"
@mousedown="addCodeBlock"
class="text-gray-600 bg-slate-200 px-2 py-1 rounded-lg hover:bg-slate-300 border hover:text-gray-900"
@click="addCodeBlock"
>
Code Block
</button>