[Bug] 自定义展开收起图标 二级下面的marginRight设置为0 没有效果 图标和文字间有间距
Nobody has claimed this yet.
- 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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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