diff --git a/packages/f2/src/components/legend/legendView.tsx b/packages/f2/src/components/legend/legendView.tsx
index f98c59717..e8f8c0840 100644
--- a/packages/f2/src/components/legend/legendView.tsx
+++ b/packages/f2/src/components/legend/legendView.tsx
@@ -88,7 +88,7 @@ export default (props) => {
data-item={item}
onClick={onClick}
>
- {Marker({ color: filtered ? '#bfbfbf' : color, type: marker })}
+ {Marker({ color: filtered ? '#bfbfbf' : color, type: item?.marker || marker })}
{/* */}
{
await delay(1000);
expect(context).toMatchImageSnapshot();
});
+
+
+ it('自定义 items Marker', async () => {
+ const context = createContext('自定义 items Marker', {
+ height: '70px',
+ });
+ const { props } = (
+
+ );
+ const canvas = new Canvas(props);
+ await canvas.render();
+
+ await delay(1000);
+ expect(context).toMatchImageSnapshot();
+ });
});
describe('点击交互', () => {