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", 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()}
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 }