评论追加快捷键

1.手机时不显示icon,且快捷键不起用
2.电脑端适配win和mac
This commit is contained in:
wangshun
2025-09-10 18:01:07 +08:00
parent b20b705e46
commit 0e46a67ea6

View File

@@ -8,7 +8,7 @@
<div class="comment-submit" :class="{ disabled: isDisabled }" @click="submit"> <div class="comment-submit" :class="{ disabled: isDisabled }" @click="submit">
<template v-if="!loading"> <template v-if="!loading">
发布评论 发布评论
<span class="shortcut-icon"> <span class="shortcut-icon" v-if="!isMobile">
{{ isMac ? '' : 'Ctrl' }} {{ isMac ? '' : 'Ctrl' }}
</span> </span>
</template> </template>
@@ -31,6 +31,7 @@ import {
} from '~/utils/vditor' } from '~/utils/vditor'
import '~/assets/global.css' import '~/assets/global.css'
import LoginOverlay from '~/components/LoginOverlay.vue' import LoginOverlay from '~/components/LoginOverlay.vue'
import { useIsMobile } from '~/utils/screen'
export default { export default {
name: 'CommentEditor', name: 'CommentEditor',
@@ -171,7 +172,7 @@ export default {
}, },
) )
return { submit, isDisabled, editorId, isMac } return { submit, isDisabled, editorId, isMac, isMobile}
}, },
} }
</script> </script>