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

[comp: Statistic] #95

Closed
1 task done
clfeng opened this issue Dec 31, 2020 · 4 comments · Fixed by #208
Closed
1 task done

[comp: Statistic] #95

clfeng opened this issue Dec 31, 2020 · 4 comments · Fixed by #208
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@clfeng
Copy link
Contributor

clfeng commented Dec 31, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

展示统计数值。

What does the proposed API look like?

名称 说明 类型 默认值 全局配置 备注
formatter 自定义数值展示 v-slot | (value) => string -
precision 数值精度 number -
prefix 设置数值的前缀 string | v-slot -
suffix 设置数值的后缀 string | v-slot -
title 数值的标题 string | v-slot -
value 数值内容 string | number -
@clfeng clfeng added the enhancement New feature or request label Dec 31, 2020
@danranVm danranVm mentioned this issue Dec 31, 2020
95 tasks
@danranVm danranVm added this to the v1.0.0 milestone Dec 31, 2020
@danranVm
Copy link
Member

@Usualminds @danranVm 负责此组件的 review, API 设计完成后请 @ 他们

@danranVm
Copy link
Member

danranVm commented Feb 9, 2021

  • decimalSeparator 和 groupSeparator,感觉意义不大?毕竟已经有 formatter 了
  • formatter 的类型就是 value => string 吧,插槽的名字应该叫 default 才对。
  • valueStyle 不需要,用户可以通过自定义less 变量或者直接添加 class 就好了。

@Usualminds
Copy link
Member

  • formatter 类型({value}) => string 建议修改为 (value) => stringv-slot 是什么场景,这里直接通过插槽自定义格式,应该可行?

@clfeng
Copy link
Contributor Author

clfeng commented Feb 18, 2021

  • formatter 类型({value}) => string 建议修改为 (value) => stringv-slot 是什么场景,这里直接通过插槽自定义格式,应该可行?

这里感觉是一个考虑点,一开始的话是打算直接value,但是后面有觉得formatter的参数如果是一个对象,是不是更好一点?方便以后扩展?不过可能确实是比较难以理解,毕竟我看antd的时候,也是通过demo是用才理解的。可能已函数参数的数量增加作为后续扩展的考虑会好点

clfeng added a commit to clfeng/idux that referenced this issue Feb 19, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 19, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 19, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 21, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 21, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 21, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 21, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 21, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 21, 2021
clfeng added a commit to clfeng/idux that referenced this issue Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants