fix(formItem):修复formItem中的help属性失效的问题 #13748
Annotations
10 errors
tests/doc.test.ts > demos demos > 📸 renders ./demos/card/CheckCard/custom.tsx correctly:
tests/demo.tsx#L132
Error: Snapshot `demos demos > 📸 renders ./demos/card/CheckCard/custom.tsx correctly 1` mismatched
- Expected
+ Received
@@ -34,7 +34,139 @@
This is the description
</div>
</div>
</div>
</div>
+ <div
+ style="margin-top: 20px; padding: 20px; background-color: #f5f5f5; border-radius: 6px;"
+ >
+ <h4>
+ CheckCard 自定义样式说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ style
+ </strong>
+ : 自定义样式对象,可以覆盖默认样式
+ </li>
+ <li>
+ <strong>
+ title
+ </strong>
+ : 卡片标题
+ </li>
+ <li>
+ <strong>
+ description
+ </strong>
+ : 卡片描述信息
+ </li>
+ </ul>
+ <h4>
+ Style 属性说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ width
+ </strong>
+ : 卡片宽度,可以是数字(像素)或字符串
+ </li>
+ <li>
+ <strong>
+ height
+ </strong>
+ : 卡片高度,可以是数字(像素)或字符串
+ </li>
+ <li>
+ <strong>
+ backgroundColor
+ </strong>
+ : 背景颜色
+ </li>
+ <li>
+ <strong>
+ border
+ </strong>
+ : 边框样式
+ </li>
+ <li>
+ <strong>
+ borderRadius
+ </strong>
+ : 圆角半径
+ </li>
+ <li>
+ <strong>
+ padding
+ </strong>
+ : 内边距
+ </li>
+ <li>
+ <strong>
+ margin
+ </strong>
+ : 外边距
+ </li>
+ </ul>
+ <h4>
+ 自定义样式特点:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ 优先级
+ </strong>
+ : style 属性会覆盖组件的默认样式
+ </li>
+ <li>
+ <strong>
+ 响应式
+ </strong>
+ : 可以使用媒体查询实现响应式样式
+ </li>
+ <li>
+ <strong>
+ 主题适配
+ </strong>
+ : 可以结合 CSS 变量实现主题切换
+ </li>
+ <li>
+ <strong>
+ 灵活控制
+ </strong>
+ : 可以精确控制卡片的尺寸和外观
+ </li>
+ </ul>
+ <h4>
+ 使用建议:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ 固定尺寸
+ </strong>
+ : 使用 width 和 height 设置固定尺寸
+ </li>
+ <li>
+ <strong>
+ 百分比布局
+ </strong>
+ : 使用百分比值实现响应式布局
+ </li>
+ <li>
+ <strong>
+ 主题定制
+ </strong>
+ : 结合 CSS 变量实现主题定制
+ </li>
+ <li>
+ <strong>
+ 动画效果
+ </strong>
+ : 可以添加 transition 等动画效果
+ </li>
+ </ul>
+ </div>
</div>
</DocumentFragment>
❯ tests/demo.tsx:132:9
|
tests/doc.test.ts > demos demos > 📸 renders ./demos/card/CheckCard/compose.tsx correctly:
tests/demo.tsx#L132
Error: Snapshot `demos demos > 📸 renders ./demos/card/CheckCard/compose.tsx correctly 1` mismatched
- Expected
+ Received
@@ -179,7 +179,133 @@
选择一个由流程编排提供的典型用户案例,可以从中学习到流程编排很多设计理念。
</div>
</div>
</div>
</div>
+ <div
+ style="margin-top: 20px; padding: 20px; background-color: #f5f5f5; border-radius: 6px;"
+ >
+ <h4>
+ CheckCard 属性组合说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ avatar
+ </strong>
+ : 卡片头像,可以是图片 URL 或 React 节点
+ </li>
+ <li>
+ <strong>
+ title
+ </strong>
+ : 卡片标题,可以是字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ description
+ </strong>
+ : 卡片描述信息,可以是字符串或 React 节点
+ </li>
+ </ul>
+ <h4>
+ 属性组合效果:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ 只有 avatar
+ </strong>
+ : 显示头像,适合图标展示
+ </li>
+ <li>
+ <strong>
+ avatar + description
+ </strong>
+ : 头像和描述组合,适合产品介绍
+ </li>
+ <li>
+ <strong>
+ title + description
+ </strong>
+ : 标题和描述组合,适合内容展示
+ </li>
+ <li>
+ <strong>
+ title + avatar
+ </strong>
+ : 标题和头像组合,适合品牌展示
+ </li>
+ <li>
+ <strong>
+ 只有 title
+ </strong>
+ : 仅显示标题,适合简单标识
+ </li>
+ <li>
+ <strong>
+ 只有 description
+ </strong>
+ : 仅显示描述,适合说明文字
+ </li>
+ </ul>
+ <h4>
+ 布局特点:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ 自适应布局
+ </strong>
+ : 根据提供的属性自动调整布局
+ </li>
+ <li>
+ <strong>
+ 内容居中
+ </strong>
+ : 单个属性时内容会自动居中显示
+ </li>
+ <li>
+ <strong>
+ 响应式
+ </strong>
+ : 在不同屏幕尺寸下保持良好的显示效果
+ </li>
+ <li>
+ <strong>
+ 灵活组合
+ </strong>
+ : 支持任意属性的组合使用
+ </li>
+ </ul>
+ <h4>
+ 使用建议:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ 图标卡片
+ </strong>
+ : 使用只有 avatar 的组合
+ </li>
+ <li>
+ <strong>
+ 产品卡片
+ </strong>
+ : 使用 avatar + title + description 组合
+ </li>
+ <li>
+ <strong>
+ 内容卡片
+ </strong>
+ : 使用 title + description 组合
+ </li>
+ <li>
+ <strong>
+ 品牌卡片
+ </strong>
+ : 使用 title + avatar 组合
+ </li>
+ </ul>
+ </div>
</div>
</DocumentFragment>
❯ tests/demo.tsx:132:9
|
tests/doc.test.ts > demos demos > 📸 renders ./demos/card/CheckCard/basic.tsx correctly:
tests/demo.tsx#L132
Error: Snapshot `demos demos > 📸 renders ./demos/card/CheckCard/basic.tsx correctly 1` mismatched
- Expected
+ Received
@@ -45,7 +45,70 @@
选择一个由流程编排提供的典型用户案例,可以从中学习到流程编排很多设计理念。
</div>
</div>
</div>
</div>
+ <div
+ style="margin-top: 20px; padding: 20px; background-color: #f5f5f5; border-radius: 6px;"
+ >
+ <h4>
+ CheckCard Props 说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ avatar
+ </strong>
+ : 卡片头像,可以是图片 URL 或 React 节点
+ </li>
+ <li>
+ <strong>
+ title
+ </strong>
+ : 卡片标题,可以是字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ description
+ </strong>
+ : 卡片描述信息,可以是字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ onChange
+ </strong>
+ : 选中状态改变时的回调函数,参数为 checked(布尔值)
+ </li>
+ <li>
+ <strong>
+ defaultChecked
+ </strong>
+ : 默认是否选中,布尔值
+ </li>
+ <li>
+ <strong>
+ onClick
+ </strong>
+ : 点击卡片时的回调函数
+ </li>
+ <li>
+ <strong>
+ checked
+ </strong>
+ : 受控的选中状态,布尔值
+ </li>
+ <li>
+ <strong>
+ disabled
+ </strong>
+ : 是否禁用,布尔值
+ </li>
+ <li>
+ <strong>
+ size
+ </strong>
+ : 卡片尺寸,可选值:'default' | 'small' | 'large'
+ </li>
+ </ul>
+ </div>
</div>
</DocumentFragment>
❯ tests/demo.tsx:132:9
|
tests/doc.test.ts > demos demos > 📸 renders ./demos/card/CheckCard/avatar.tsx correctly:
tests/demo.tsx#L132
Error: Snapshot `demos demos > 📸 renders ./demos/card/CheckCard/avatar.tsx correctly 1` mismatched
- Expected
+ Received
@@ -56,7 +56,80 @@
</div>
</div>
</div>
</div>
</div>
+ <div
+ style="margin-top: 20px; padding: 20px; background-color: #f5f5f5; border-radius: 6px;"
+ >
+ <h4>
+ CheckCard Avatar Props 说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ avatar
+ </strong>
+ : 卡片头像,可以是图片 URL 字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ title
+ </strong>
+ : 卡片标题
+ </li>
+ </ul>
+ <h4>
+ Avatar 组件 Props:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ style
+ </strong>
+ : 头像样式对象,可以设置背景色等
+ </li>
+ <li>
+ <strong>
+ icon
+ </strong>
+ : 头像图标,可以是 Ant Design 图标组件
+ </li>
+ <li>
+ <strong>
+ size
+ </strong>
+ : 头像尺寸,可选值:'large' | 'default' | 'small'
+ </li>
+ <li>
+ <strong>
+ src
+ </strong>
+ : 头像图片地址(字符串形式)
+ </li>
+ </ul>
+ <h4>
+ Avatar 使用方式:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ 字符串
+ </strong>
+ : 直接传入图片 URL,如 avatar="https://example.com/image.jpg"
+ </li>
+ <li>
+ <strong>
+ 组件
+ </strong>
+ : 传入 Avatar 组件,可以自定义样式和图标
+ </li>
+ <li>
+ <strong>
+ 图标
+ </strong>
+ : 使用 Ant Design 图标作为头像内容
+ </li>
+ </ul>
+ </div>
</div>
</DocumentFragment>
❯ tests/demo.tsx:132:9
|
tests/doc.test.ts > demos demos > 📸 renders ./demos/card/bordered.tsx correctly:
tests/demo.tsx#L132
Error: Snapshot `demos demos > 📸 renders ./demos/card/bordered.tsx correctly 1` mismatched
- Expected
+ Received
@@ -62,7 +62,75 @@
class="ant-pro-card-body"
>
Content
</div>
</div>
+ <div
+ style="margin-top: 20px; padding: 20px; background-color: #f5f5f5; border-radius: 6px;"
+ >
+ <h4>
+ ProCard Props 说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ title
+ </strong>
+ : 卡片标题,可以是字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ extra
+ </strong>
+ : 卡片右上角操作区域,可以是字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ tooltip
+ </strong>
+ : 卡片的提示信息
+ </li>
+ <li>
+ <strong>
+ style
+ </strong>
+ : 卡片的样式对象
+ </li>
+ <li>
+ <strong>
+ variant
+ </strong>
+ : 卡片变体样式,'outlined' 表示带边框的卡片样式
+ </li>
+ <li>
+ <strong>
+ children
+ </strong>
+ : 卡片内容区域
+ </li>
+ </ul>
+ <h4>
+ Variant 说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ outlined
+ </strong>
+ : 带边框的卡片样式,适合需要明确边界的场景
+ </li>
+ <li>
+ <strong>
+ filled
+ </strong>
+ : 填充式卡片样式,背景色填充
+ </li>
+ <li>
+ <strong>
+ elevated
+ </strong>
+ : 提升式卡片样式,带有阴影效果
+ </li>
+ </ul>
+ </div>
</div>
</DocumentFragment>
❯ tests/demo.tsx:132:9
|
tests/doc.test.ts > demos demos > 📸 renders ./demos/card/basic.tsx correctly:
tests/demo.tsx#L132
Error: Snapshot `demos demos > 📸 renders ./demos/card/basic.tsx correctly 1` mismatched
- Expected
+ Received
@@ -243,7 +243,64 @@
<div>
Card content
</div>
</div>
</div>
+ <div
+ style="margin-top: 20px; padding: 20px; background-color: #f5f5f5; border-radius: 6px;"
+ >
+ <h4>
+ ProCard Props 说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ title
+ </strong>
+ : 卡片标题,可以是字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ variant
+ </strong>
+ : 卡片变体样式,可选值:'outlined' | 'filled' | 'elevated'
+ </li>
+ <li>
+ <strong>
+ extra
+ </strong>
+ : 卡片右上角操作区域,可以是字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ tooltip
+ </strong>
+ : 卡片的提示信息
+ </li>
+ <li>
+ <strong>
+ style
+ </strong>
+ : 卡片的样式对象
+ </li>
+ <li>
+ <strong>
+ boxShadow
+ </strong>
+ : 是否显示阴影效果,布尔值
+ </li>
+ <li>
+ <strong>
+ size
+ </strong>
+ : 卡片尺寸,可选值:'default' | 'small'
+ </li>
+ <li>
+ <strong>
+ children
+ </strong>
+ : 卡片内容区域
+ </li>
+ </ul>
+ </div>
</div>
</DocumentFragment>
❯ tests/demo.tsx:132:9
|
tests/doc.test.ts > demos demos > 📸 renders ./demos/card/actions.tsx correctly:
tests/demo.tsx#L132
Error: Snapshot `demos demos > 📸 renders ./demos/card/actions.tsx correctly 1` mismatched
- Expected
+ Received
@@ -204,7 +204,69 @@
</div>
</div>
</div>
</div>
</div>
+ <div
+ style="margin-top: 20px; padding: 20px; background-color: #f5f5f5; border-radius: 6px;"
+ >
+ <h4>
+ ProCard Props 说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ title
+ </strong>
+ : 卡片标题,可以是字符串或 React 节点
+ </li>
+ <li>
+ <strong>
+ actions
+ </strong>
+ : 卡片操作区域,可以是数组(多个操作按钮)或单个 React 节点
+ </li>
+ <li>
+ <strong>
+ variant
+ </strong>
+ : 卡片变体样式,可选值:'outlined' | 'filled' | 'elevated'
+ </li>
+ <li>
+ <strong>
+ style
+ </strong>
+ : 卡片的样式对象
+ </li>
+ <li>
+ <strong>
+ children
+ </strong>
+ : 卡片内容区域
+ </li>
+ </ul>
+ <h4>
+ Actions 使用说明:
+ </h4>
+ <ul>
+ <li>
+ <strong>
+ 数组形式
+ </strong>
+ : 传入 React 节点数组,每个元素会渲染为一个操作按钮
+ </li>
+ <li>
+ <strong>
+ 单个节点
+ </strong>
+ : 传入单个 React 节点,可以自定义操作区域的布局和样式
+ </li>
+ <li>
+ <strong>
+ 不设置
+ </strong>
+ : 如果不设置 actions 属性,卡片底部不会显示操作区域
+ </li>
+ </ul>
+ </div>
</div>
</DocumentFragment>
❯ tests/demo.tsx:132:9
|
Unhandled error:
tests/form/loginForm.test.tsx#L143
AssertionError: expected "spy" to be called at least once
Ignored nodes: comments, script, style
<html>
<head />
<body />
</html>...
❯ Proxy.<anonymous> node_modules/.pnpm/@vitest[email protected]/node_modules/@vitest/expect/dist/index.js:1335:10
❯ Proxy.<anonymous> node_modules/.pnpm/@vitest[email protected]/node_modules/@vitest/expect/dist/index.js:1029:14
❯ Proxy.methodWrapper node_modules/.pnpm/[email protected]/node_modules/chai/chai.js:1706:25
❯ tests/form/loginForm.test.tsx:143:18
❯ runNextTicks node:internal/process/task_queues:60:5
❯ listOnTimeout node:internal/timers:545:9
❯ processTimers node:internal/timers:519:7
This error originated in "tests/form/loginForm.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
|
Unhandled error:
tests/table/column.test.tsx#L306
AssertionError: expected to have a length of 1 but got +0
- Expected
+ Received
- 1
+ 0
❯ Proxy.<anonymous> node_modules/.pnpm/@vitest[email protected]/node_modules/@vitest/expect/dist/index.js:1257:20
❯ Proxy.<anonymous> node_modules/.pnpm/@vitest[email protected]/node_modules/@vitest/expect/dist/index.js:1029:14
❯ Proxy.methodWrapper node_modules/.pnpm/[email protected]/node_modules/chai/chai.js:1706:25
❯ Timeout._onTimeout tests/table/column.test.tsx:306:62
❯ listOnTimeout node:internal/timers:581:17
❯ processTimers node:internal/timers:519:7
This error originated in "tests/table/column.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
This error was caught after test environment was torn down. Make sure to cancel any running tasks before test finishes:
- cancel timeouts using clearTimeout and clearInterval
- wait for promises to resolve using the await keyword
|
Unhandled error:
src/descriptions/useFetchData.tsx#L765
ReferenceError: window is not defined
❯ getCurrentEventPriority node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:10993:22
❯ requestUpdateLane node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25495:19
❯ dispatchSetState node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16648:14
❯ safeSetState node_modules/.pnpm/@rc-component[email protected][email protected][email protected][email protected]/node_modules/@rc-component/util/lib/hooks/useState.js:28:5
❯ Object.current node_modules/.pnpm/@rc-component[email protected][email protected][email protected][email protected]/node_modules/@rc-component/util/lib/hooks/useMergedState.js:60:5
❯ node_modules/.pnpm/@rc-component[email protected][email protected][email protected][email protected]/node_modules/@rc-component/util/lib/hooks/useEvent.js:16:64
❯ fetchList src/descriptions/useFetchData.tsx:765:7
❯ runNextTicks node:internal/process/task_queues:60:5
❯ processTimers node:internal/timers:516:9
This error originated in "tests/descriptions/index.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
This error was caught after test environment was torn down. Make sure to cancel any running tasks before test finishes:
- cancel timeouts using clearTimeout and clearInterval
- wait for promises to resolve using the await keyword
|