VisActor / VisActor/VTable

[Feature] 希望icon能支持marginBottom和marginTop的配置

Open
#2,675 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What problem does this feature solve?

自定义icon现在只能让icon垂直居中,我想实现让icon在右下角就能避免遮挡文字。现在只有marginRight和marginLeft。
图片

VTable.register.icon(TableRegisterName.MINUS_COLUMN, {
  type: 'svg',
  name: TableRegisterName.MINUS_COLUMN,
  marginRight: 5,
  positionType: VTable.TYPES.IconPosition.absoluteRight,
  width: 16,
  height: 16,
  svg: `<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z" fill="#409eff" stroke="#409eff" stroke-width="4" stroke-linejoin="round"/><path d="M16 24L32 24" stroke="#FFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>`,
  tooltip: {
    style: { arrowMark: true },
    title: '删除当前列',
    placement: 'bottom',
  },
});
What does the proposed API look like?

希望能增加marginTop和marginBottom的属性灵活配置

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 locating the icon configuration type and the existing marginRight and marginLeft handling in the TypeScript code. Add matching top and bottom configuration support, then verify that custom icons can use both properties with absolute positioning without obscuring text.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.