From 6f3830b3f7719dcee2f25fa7a319ba4ea861c2d7 Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 15 Aug 2025 00:50:44 +0800 Subject: [PATCH] fix: revert vditor change --- frontend_nuxt/utils/vditor.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend_nuxt/utils/vditor.js b/frontend_nuxt/utils/vditor.js index 11adebc5d..c38aed7b1 100644 --- a/frontend_nuxt/utils/vditor.js +++ b/frontend_nuxt/utils/vditor.js @@ -2,7 +2,6 @@ import Vditor from 'vditor' import { getToken, authState } from './auth' import { searchUsers, fetchFollowings, fetchAdmins } from './user' import { tiebaEmoji } from './tiebaEmoji' -import { useIsMobile } from './screen' export function getEditorTheme() { return document.documentElement.dataset.theme === 'dark' ? 'dark' : 'classic' @@ -34,8 +33,7 @@ export function createVditor(editorId, options = {}) { return searchUsers(value) } - const isMobile = useIsMobile() - + const isMobile = window.innerWidth <= 768 const toolbar = isMobile ? ['emoji', 'upload'] : [ @@ -166,7 +164,7 @@ export function createVditor(editorId, options = {}) { // } // } // }, - toolbarConfig: { pin: isMobile ? false : true }, + toolbarConfig: { pin: true }, cache: { enable: false }, input, after,