VisActor / VisActor/VTable

[Bug] 自定义展开收起图标 二级下面的marginRight设置为0 没有效果 图标和文字间有间距

Open
#4,038 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
3.7k
Forks
486
Avg merge
1d 19h
Merged PRs (30d)
16

Description

Version

1.18.5

Link to Minimal Reproduction

111

Steps to Reproduce

11

Current Behavior

VTable.register.icon('expand', {
type: 'svg',
svg: minusIcon,
width: 20,
height: 20,
name: 'expand',
funcType: VTable.TYPES.IconFuncTypeEnum.expand, // 这个配置是必须的
positionType: VTable.TYPES.IconPosition.left,
marginRight: 0
});
// 替换收起图标
VTable.register.icon('collapse', {
type: 'svg',
svg: plusIcon,
width: 20,
height: 20,
name: 'collapse',
funcType: VTable.TYPES.IconFuncTypeEnum.collapse,
positionType: VTable.TYPES.IconPosition.left,
marginRight: 0
// 其他配置...
});

Expected Behavior

11

Environment
- OS:
- Browser:
- Framework:
Any additional comments?

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in VTable 1.18.5 using the VTable.register.icon expand and collapse configurations shown in the report. Trace how the custom icon's marginRight is applied to the second-level row layout, then verify that setting it to 0 removes the gap between the icon and text and add regression coverage if the project provides a relevant test entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.