From 235d11ecdd3ee45d73d8382ade3afc780faaa86e Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Thu, 6 Aug 2026 18:35:24 -0600 Subject: [PATCH] fix --- src/oj/problem/components/ProblemReaction.vue | 362 +++++++++--------- 1 file changed, 171 insertions(+), 191 deletions(-) diff --git a/src/oj/problem/components/ProblemReaction.vue b/src/oj/problem/components/ProblemReaction.vue index 34fbe93..23a4344 100644 --- a/src/oj/problem/components/ProblemReaction.vue +++ b/src/oj/problem/components/ProblemReaction.vue @@ -29,10 +29,9 @@ let loadSequence = 0 const wheelGeometry = { startAngle: -90, - contentRadius: 34.5, - pushRadius: 4.5, + contentRadius: 35, + pushRadius: 4, outerRadius: 50, - gapAngle: 1.15, arcPointCount: 9, hitInnerRadius: 0.18, hitOuterRadius: 0.49, @@ -50,8 +49,9 @@ function pointOnCircle(angle: number, radius: number) { function getWheelItemStyle(index: number): CSSProperties { const centerAngle = wheelGeometry.startAngle + index * sliceAngle - const startAngle = centerAngle - sliceAngle / 2 + wheelGeometry.gapAngle - const endAngle = centerAngle + sliceAngle / 2 - wheelGeometry.gapAngle + const startAngle = centerAngle - sliceAngle / 2 + const endAngle = centerAngle + sliceAngle / 2 + const dividerAngle = index * sliceAngle - sliceAngle / 2 const position = pointOnCircle(centerAngle, wheelGeometry.contentRadius) const push = pointOnCircle(centerAngle, wheelGeometry.pushRadius) const arcPoints = Array.from( @@ -70,6 +70,7 @@ function getWheelItemStyle(index: number): CSSProperties { "--content-y": `${position.y}%`, "--push-x": `${push.x - 50}px`, "--push-y": `${push.y - 50}px`, + "--divider-angle": `${dividerAngle}deg`, } } @@ -161,11 +162,7 @@ const wheelCenter = computed(() => { const reactionStyle = computed(() => ({ "--reaction-accent": theme.value.primaryColor, "--reaction-card": theme.value.cardColor, - "--reaction-action": theme.value.actionColor, - "--reaction-hover": theme.value.hoverColor, "--reaction-border": theme.value.borderColor, - "--reaction-rail": theme.value.railColor, - "--reaction-shadow": theme.value.boxShadow1, "--reaction-text": theme.value.textColor1, "--reaction-text-faint": theme.value.textColor3, })) @@ -305,67 +302,75 @@ watch( @pointerleave="clearPreview" @click="onWheelClick" > -