From c4d55bb88e7878c618256509c165a38fcbdd1b86 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Thu, 6 Aug 2026 04:12:55 -0600 Subject: [PATCH] fix(reaction): fix disabled-tooltip hover and post-AC dialog copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SubmitCode.vue: AC dialog title still told students to '打星 评分' after the reaction UI moved to emoji buttons. Rewritten to match the emoji-based interaction, with no star/rating language. - ProblemReaction.vue: n-tooltip's hover trigger merges its mouseenter/mouseleave onto the single root element of the trigger slot. That root was an n-button, and disabled form controls never dispatch mouse events, so the two disabled-state tooltips ('完成本题后可以评价' and the max-selection message) never appeared. Wrap each button in a non-disabled and make that the tooltip root so hover events fire regardless of the button's disabled state. Co-Authored-By: Claude Opus 5 --- src/oj/problem/components/ProblemReaction.vue | 28 +++++++++++-------- src/oj/problem/components/SubmitCode.vue | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/oj/problem/components/ProblemReaction.vue b/src/oj/problem/components/ProblemReaction.vue index 376771d..a950ba5 100644 --- a/src/oj/problem/components/ProblemReaction.vue +++ b/src/oj/problem/components/ProblemReaction.vue @@ -3,17 +3,19 @@
{{ tooltipOf(item.key, item.label) }} @@ -106,6 +108,10 @@ onMounted(() => { gap: 8px; overflow-x: auto; } +.reaction-trigger { + display: inline-flex; + flex-shrink: 0; +} .label { margin-left: 4px; } diff --git a/src/oj/problem/components/SubmitCode.vue b/src/oj/problem/components/SubmitCode.vue index e2beeb3..3e37472 100644 --- a/src/oj/problem/components/SubmitCode.vue +++ b/src/oj/problem/components/SubmitCode.vue @@ -259,7 +259,7 @@ watch(