Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress 进度条颜色渐变无效 #1128

Closed
PandaLeo opened this issue Oct 17, 2023 · 4 comments
Closed

Progress 进度条颜色渐变无效 #1128

PandaLeo opened this issue Oct 17, 2023 · 4 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@PandaLeo
Copy link

tdesign-mobile-vue 版本

1.0.2

重现链接

https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/progress/type.ts

重现步骤

按照文档
/**

  • 进度条颜色。示例:'#ED7B2F' 或 'orange' 或 ['#f00', '#0ff', '#f0f']{ '0%': '#f00', '100%': '#0ff' }{ from: '#000', to: '#000' }
  • @default ''
    */
    color?: string | Array | Record<string, string>;
    这里的进度条颜色在 { '0%': '#f00', '100%': '#0ff' }{ from: '#000', to: '#000' }定义下应该支持渐变色,但是实测只有单色生效

期望结果

支持渐变色显示

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

18.2.0

补充说明

No response

@github-actions
Copy link
Contributor

👋 @PandaLeo,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@anlyyao
Copy link
Collaborator

anlyyao commented Oct 18, 2023

@PandaLeo 你在确认一下使用? 我这边测试提供的示例都能支持到。

<t-progress :percentage="80" :color="{ '0%': '#f00', '100%': '#0ff' }" />
<t-progress :percentage="80" :color="{ from: '#f00', to: '#000' }" />
<t-progress :percentage="80" :color="['#f00', '#0ff', '#f0f']" />
截屏2023-10-18 11 44 12

@anlyyao anlyyao added the question Further information is requested label Oct 18, 2023
@PandaLeo
Copy link
Author

@PandaLeo 你在确认一下使用? 我这边测试提供的示例都能支持到。

<t-progress :percentage="80" :color="{ '0%': '#f00', '100%': '#0ff' }" />
<t-progress :percentage="80" :color="{ from: '#f00', to: '#000' }" />
<t-progress :percentage="80" :color="['#f00', '#0ff', '#f0f']" />
截屏2023-10-18 11 44 12

@anlyyao 抱歉,我这里写的不够详细,直线进度条是渐变可用的,环形进度条使用渐变色的没有生效

@anlyyao
Copy link
Collaborator

anlyyao commented Oct 26, 2023

@PandaLeo 你在确认一下使用? 我这边测试提供的示例都能支持到。

<t-progress :percentage="80" :color="{ '0%': '#f00', '100%': '#0ff' }" />
<t-progress :percentage="80" :color="{ from: '#f00', to: '#000' }" />
<t-progress :percentage="80" :color="['#f00', '#0ff', '#f0f']" />
截屏2023-10-18 11 44 12

@anlyyao 抱歉,我这里写的不够详细,直线进度条是渐变可用的,环形进度条使用渐变色的没有生效

环形不支持渐变色。环形是基于 svg circle实现的,里面的渐变色实现有些复杂,需要考虑两种和多种渐变色,目前并不考虑支持嘎~

@anlyyao anlyyao added the wontfix This will not be worked on label Nov 2, 2023
@anlyyao anlyyao closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants