fix(mp): 修复 72 个 TypeScript 类型错误 — noImplicitAny 全量通过
- 移除 28 个文件中不再需要的 import React (jsx: react-jsx) - 修复 catch(err: any) → catch(err: unknown) 类型收窄 - 修复 __wxConfig / CanvasRenderingContext2D 全局类型声明 - 修复 DTO 类型不匹配 (UpdateDialysisRecordReq, notificationService) - 移除 52 个未使用的 import/变量/常量 - 修复 services 类型 (auth.ts tenant_id, actionInbox boolean, device-sync)
This commit is contained in:
@@ -3,6 +3,10 @@ import { Canvas, View, Text } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
import './index.scss';
|
||||
|
||||
/** Canvas 2D 上下文类型 — 微信小程序 Canvas 2d 接口 */
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type CanvasRenderingContext2D = any;
|
||||
|
||||
interface TrendChartProps {
|
||||
data: { date: string; value: number }[];
|
||||
referenceMin?: number;
|
||||
@@ -181,7 +185,6 @@ export default React.memo(function TrendChart({
|
||||
if (!node) return;
|
||||
canvasRef.current = node;
|
||||
const sysInfo = Taro.getSystemInfoSync();
|
||||
const canvasW = (sysInfo.windowWidth * 750) / sysInfo.windowWidth;
|
||||
node.width = sysInfo.windowWidth * getDPR();
|
||||
node.height = ((height / 750) * sysInfo.windowWidth) * getDPR();
|
||||
draw();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
import React from 'react';
|
||||
import { View, Text } from '@tarojs/components';
|
||||
import './index.scss';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user