From 8c5a80741f52e03d0a6f6a0255a2b90e5c99861b Mon Sep 17 00:00:00 2001 From: "Y." Date: Thu, 15 Oct 2026 20:58:25 +0800 Subject: [PATCH 1/3] fix(Comment): fix type errors --- src/comment/Comment.tsx | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/comment/Comment.tsx b/src/comment/Comment.tsx index b006ae961..f70d19175 100644 --- a/src/comment/Comment.tsx +++ b/src/comment/Comment.tsx @@ -1,4 +1,5 @@ import React, { ReactNode, useEffect, useLayoutEffect, useRef, useState } from 'react'; +import classNames from 'classnames'; import { isObject } from 'lodash-es'; import { ChevronDownSIcon, ChevronUpSIcon } from 'tdesign-icons-react'; import { CommentActionItem, CommentFold, CommentFoldState, TdCommentProps } from './type'; @@ -19,9 +20,22 @@ const DEFAULT_COMMENT_FOLDS: CommentFold = { expanded: '收起', }, }; -const Comment: React.FC = (props) => { - const { actions, author, avatar, content, datetime, folds, defaultFolds, reply, children, onActions, onFolds } = - props; +const Comment: React.FC = (props) => { + const { + className, + style, + actions, + author, + avatar, + content, + datetime, + folds, + defaultFolds, + reply, + children, + onActions, + onFolds, + } = props; const [innerFoldsState, setInnerFoldsState] = useState(defaultFolds?.state || 'collapsed'); const foldSteps = useRef(0); const replyBodyRef = useRef(null); @@ -217,7 +231,7 @@ const Comment: React.FC = (props) => { }; return ( -
+
{renderAvatar()}
From 5242858d8f4118a18da8a23ac3dfd1e388f59cf5 Mon Sep 17 00:00:00 2001 From: "Y." Date: Thu, 15 Oct 2026 21:00:59 +0800 Subject: [PATCH 2/3] chore: remove the non-existent global.d.ts --- tsconfig.build.json | 2 +- tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.build.json b/tsconfig.build.json index 94446d9ce..077da8962 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,6 +1,6 @@ { "extends": "./tsconfig", - "include": ["./src", "./globals.d.ts"], + "include": ["./src"], "exclude": [ "**/**/__tests__/*", "**/**/_example/*", diff --git a/tsconfig.json b/tsconfig.json index 00432d3dd..ea46760ef 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,7 +26,7 @@ "skipLibCheck": true, "types": ["node", "vitest/globals"] }, - "include": ["./src", "./global.d.ts"], + "include": ["./src"], "exclude": ["node_modules", "src/_common", "dist", "lib", "cjs", "esm", "es", "site", "**/*.jsx"], "compileOnSave": false } From 7f10f1ad12e9576039fdf683f92af89ba8f9fe0f Mon Sep 17 00:00:00 2001 From: "Y." Date: Thu, 15 Oct 2026 21:04:18 +0800 Subject: [PATCH 3/3] chore: remove duplicate csstype entry in devDependencies --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 1a3601552..c7c90ef69 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,6 @@ "concurrently": "^6.4.0", "cross-env": "^10.0.0", "cssnano": "^5.0.12", - "csstype": "^3.1.3", "cz-conventional-changelog": "^3.3.0", "dom-parser": "^1.1.5", "eslint": "^8.4.1",