Tencent / Tencent/tdesign-react
[Skeleton] 新增col 设置圆角、 背景颜色属性
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 965
- Forks
- 373
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 17
Description
这个功能解决了什么问题
希望可以新增 ColItem 圆角属性 , 这个在一些场景还是挺常用的
const getColItemStyle = (obj: SkeletonRowColObj): Styles => {
const styleName = [
'width',
'height',
'marginRight',
'marginLeft',
'margin',
'size',
'background',
'backgroundColor',
];
const style: Styles = {};
styleName.forEach((name) => {
if (name in obj) {
const px = pxCompat(obj[name]);
if (name === 'size') {
[style.width, style.height] = [px, px];
} else {
style[name] = px;
}
}
});
return style;
};
你建议的方案是什么
SkeletonRowColObj 新增 borderRadio 属性
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 locating the SkeletonRowColObj type and the getColItemStyle entry point shown in the issue. Trace how the listed style properties are converted and applied, then add support for the requested borderRadio property and verify that ColItem renders the resulting rounded styling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100