commit | author | age
|
9bcb19
|
1 |
# Trend 趋势标记 |
I |
2 |
|
|
3 |
趋势符号,标记上升和下降趋势。通常用绿色代表“好”,红色代表“不好”,股票涨跌场景除外。 |
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
引用方式: |
|
8 |
|
|
9 |
```javascript |
|
10 |
import Trend from '@/components/Trend' |
|
11 |
|
|
12 |
export default { |
|
13 |
components: { |
|
14 |
Trend |
|
15 |
} |
|
16 |
} |
|
17 |
``` |
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
## 代码演示 [demo](https://pro.loacg.com/test/home) |
|
22 |
|
|
23 |
```html |
|
24 |
<trend flag="up">5%</trend> |
|
25 |
``` |
|
26 |
或 |
|
27 |
```html |
|
28 |
<trend flag="up"> |
|
29 |
<span slot="term">工资</span> |
|
30 |
5% |
|
31 |
</trend> |
|
32 |
``` |
|
33 |
或 |
|
34 |
```html |
|
35 |
<trend flag="up" term="工资">5%</trend> |
|
36 |
``` |
|
37 |
|
|
38 |
|
|
39 |
## API |
|
40 |
|
|
41 |
| 参数 | 说明 | 类型 | 默认值 | |
|
42 |
|----------|------------------------------------------|-------------|-------| |
|
43 |
| flag | 上升下降标识:`up|down` | string | - | |
|
44 |
| reverseColor | 颜色反转 | Boolean | false | |
|
45 |
|