-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update statistic style and docs (#1329)
- Loading branch information
Showing
4 changed files
with
110 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: Statistic | ||
description: Highlight and display a set of numeric or descriptive statistical data. | ||
isComponent: true | ||
usage: { title: '', description: '' } | ||
spline: data | ||
--- | ||
|
||
### 基础用法 | ||
|
||
Use when you need to highlight a set of numeric or descriptive statistical data. | ||
|
||
{{ base }} | ||
|
||
### 趋势不同的组件 | ||
|
||
Set the trend state of the component through trend and control the trend display position through trendPlacement. | ||
|
||
{{ trend }} | ||
|
||
### 颜色 | ||
|
||
The color style provides five default TDesign style color values, which can also be customized. | ||
|
||
{{ color }} | ||
### 前缀后缀/自定义 | ||
|
||
Customize through the prefix and suffix slots. | ||
|
||
{{ slot }} | ||
|
||
### 数值动画 | ||
|
||
Configure the initial value and duration of the animation through animation. Use the animationStart attribute to control when the animation starts. If there are special requirements, you can also use ref to get the instance and call start for control. | ||
|
||
{{ animation }} | ||
|
||
### 加载中 | ||
|
||
Control the loading state of the numeric value through loading. | ||
|
||
{{ loading }} | ||
|
||
### 组合使用 | ||
|
||
{{ combination }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
// 组件变量 | ||
// 名称可按如下规则定义: | ||
// <component>-[type]-[attrtype]-<attr>-[status] | ||
|
||
// component:组件名,如button, | ||
// type: 组件类型,如 button 的次要按钮(line) | ||
// attrtype: 属性的具体应用场景。如颜色,用于背景(bg)、文本(text)、边框(border)等 | ||
// attr: 属性名称,如color、height、radius等 | ||
// status: 表示组件状态或尺寸,如 hover、disabled、s、l 等 | ||
|
||
// 如:@button-line-bg-color-hover | ||
// 如:@button-line-height-s | ||
@import "../../base.less"; | ||
|
||
@statistic-cls: ~"@{prefix}-statistic"; | ||
|
||
@statistic-text-color: @text-color-secondary; | ||
|
||
@statistic-title-font-size: @font-title-medium; | ||
@statistic-title-margin-bottom: @spacer-1; | ||
@statistic-extra-margin-top: @spacer-1; | ||
@statistic-integer-font-size: 26px; | ||
@statistic-decimal-font-size: @statistic-integer-font-size; | ||
@statistic-title-font-weight: 400; | ||
@statistic-title-margin-bottom: @spacer-s; | ||
|
||
@statistic-value-font-size: 28px; | ||
@statistic-value-font-weight: 500; | ||
@statistic-value-text-color: @text-color-primary; | ||
@statistic-text-color: @text-color-secondary; | ||
@statistic-title-text-color: @text-color-secondary; | ||
@statistic-extra-text-color: @text-color-secondary; | ||
@statistic-value-icon-size: @font-size-base; | ||
@statistic-suffix-font-size: @font-size-base; | ||
|
||
@statistic-unit-font-size: 14px; | ||
@statistic-unit-margin-left: @spacer-s; | ||
|
||
@statistic-prefix-font-size: 22px; | ||
@statistic-prefix-margin-right: @spacer-s; | ||
|
||
@statistic-suffix-font-size: 22px; | ||
@statistic-suffix-margin-left: @spacer-s; | ||
|
||
@statistic-extra-margin-top: @spacer-1; |