fix: 修复合并后 TypeScript 编译错误

- 补充 RefObject import(local-captcha、slider-captcha、node-group-form)
- 删除 slider-captcha 中无用的 _scaleX/_scaleY 变量
- user_subscribe_id 类型转换 number → string
- 移除 services 文件中失效的 @ts-expect-error 指令
This commit is contained in:
2026-03-24 01:23:36 -07:00
parent ef54d2479d
commit 8d0ddbb5ef
28 changed files with 167 additions and 30 deletions
@@ -2,7 +2,13 @@ import { Button } from "@workspace/ui/components/button";
import { Input } from "@workspace/ui/components/input";
import { Icon } from "@workspace/ui/composed/icon";
import { adminGenerateCaptcha } from "@workspace/ui/services/admin/auth";
import { useEffect, useImperativeHandle, useState } from "react";
import {
type RefObject,
useEffect,
useImperativeHandle,
useState,
} from "react";
import { useTranslation } from "react-i18next";
export interface LocalCaptchaRef {
@@ -10,7 +10,14 @@ import {
adminGenerateCaptcha,
adminVerifyCaptchaSlider,
} from "@workspace/ui/services/admin/auth";
import { useCallback, useImperativeHandle, useRef, useState } from "react";
import {
type RefObject,
useCallback,
useImperativeHandle,
useRef,
useState,
} from "react";
import { useTranslation } from "react-i18next";
export interface SliderCaptchaRef {
@@ -105,9 +112,7 @@ const SliderCaptcha = ({
(e.target as HTMLElement).setPointerCapture(e.pointerId);
e.preventDefault();
const { w, h } = getContainerSize();
const _scaleX = BG_NATURAL_WIDTH / w;
const _scaleY = BG_NATURAL_HEIGHT / h;
const { w: _w, h: _h } = getContainerSize();
trail.current.push({
x: Math.round(startBlock.current.x),
y: Math.round(startBlock.current.y),