|
10 | 10 | *
|
11 | 11 | */
|
12 | 12 |
|
13 |
| -@import '../mixins/progress.less'; |
14 | 13 | @import '../custom.less';
|
15 | 14 | @import './vars.less';
|
16 | 15 |
|
17 | 16 | @progress-prefix-cls: ~'@{css-prefix}progress';
|
18 | 17 |
|
19 | 18 | .@{progress-prefix-cls} {
|
20 |
| - .component-css-vars-progress(); |
| 19 | + .inject-Progress-vars(); |
21 | 20 |
|
22 | 21 | position: relative;
|
| 22 | + display: flex; |
| 23 | + align-items: center; |
23 | 24 | line-height: 1;
|
24 |
| - display: flex; // smb新增 |
25 |
| - align-items: center; // smb新增 |
| 25 | + |
| 26 | + /** 横向条自身默认场景 */ |
| 27 | + &-bar { |
| 28 | + width: 100%; |
| 29 | + -webkit-box-sizing: border-box; |
| 30 | + box-sizing: border-box; |
| 31 | + |
| 32 | + &__outer { |
| 33 | + position: relative; |
| 34 | + height: 6px; |
| 35 | + overflow: hidden; |
| 36 | + vertical-align: middle; |
| 37 | + background-color: var(--tv-Progress-outer-bg-color); |
| 38 | + } |
| 39 | + |
| 40 | + &__inner { |
| 41 | + position: absolute; |
| 42 | + left: 0; |
| 43 | + top: 0; |
| 44 | + height: 100%; |
| 45 | + line-height: 1; |
| 46 | + text-align: right; |
| 47 | + white-space: nowrap; |
| 48 | + background-color: var(--tv-Progress-inner-bg-color); |
| 49 | + transition: width 0.6s ease; |
| 50 | + |
| 51 | + &::after { |
| 52 | + content: ''; |
| 53 | + height: 100%; |
| 54 | + } |
| 55 | + } |
| 56 | + |
| 57 | + &__innerText { |
| 58 | + margin: 0 5px; |
| 59 | + font-size: var(--tv-Progress-inner-font-size); |
| 60 | + color: var(--tv-Progress-inner-text-color); |
| 61 | + } |
| 62 | + |
| 63 | + &, |
| 64 | + &__inner::after, |
| 65 | + &__innerText { |
| 66 | + display: inline-block; |
| 67 | + vertical-align: middle; |
| 68 | + } |
| 69 | + } |
| 70 | + |
| 71 | + /** 横向条状态场景 */ |
| 72 | + .progress-status(@color) { |
| 73 | + .@{progress-prefix-cls}-bar__inner { |
| 74 | + background-color: @color; |
| 75 | + } |
| 76 | + |
| 77 | + .@{progress-prefix-cls}__text svg { |
| 78 | + fill: @color; |
| 79 | + } |
| 80 | + } |
26 | 81 |
|
27 | 82 | &.is-success {
|
28 |
| - .progress-status(var(--ti-progress-success-bg-color)); |
| 83 | + .progress-status(var(--tv-Progress-bg-color-success)); |
29 | 84 | }
|
30 | 85 |
|
31 | 86 | &.is-warning {
|
32 |
| - .progress-status(var(--ti-progress-warning-bg-color)); |
| 87 | + .progress-status(var(--tv-Progress-bg-color-warning)); |
33 | 88 | }
|
34 | 89 |
|
35 | 90 | &.is-exception {
|
36 |
| - .progress-status(var(--ti-progress-exception-bg-color)); |
| 91 | + .progress-status(var(--tv-Progress-bg-color-exception)); |
37 | 92 | }
|
38 | 93 |
|
| 94 | + /** 右侧文字场景 */ |
39 | 95 | &__text {
|
40 |
| - font-size: var(--ti-progress-text-font-size); |
41 |
| - color: var(--ti-progress-text-color); |
42 | 96 | display: inline-block;
|
43 |
| - vertical-align: middle; |
44 |
| - margin-left: var(--ti-progress-bar-text-margin-left); // smb新增 |
| 97 | + margin-left: var(--tv-Progress-right-text-margin-left); |
| 98 | + font-size: 14px; |
45 | 99 | line-height: 1;
|
| 100 | + vertical-align: middle; |
46 | 101 | white-space: nowrap;
|
| 102 | + color: var(--tv-Progress-right-text-color); |
47 | 103 |
|
48 | 104 | i {
|
49 |
| - vertical-align: middle; |
50 | 105 | display: inline-block;
|
| 106 | + vertical-align: middle; |
51 | 107 | }
|
52 | 108 | }
|
53 | 109 |
|
54 |
| - &--circle, |
55 |
| - &--dashboard { |
56 |
| - display: inline-block; |
57 |
| - |
58 |
| - .@{progress-prefix-cls}__text { |
59 |
| - top: 50%; |
60 |
| - position: absolute; |
61 |
| - width: 100%; |
62 |
| - text-align: center; |
63 |
| - margin: 0; |
64 |
| - transform: translate(0, -50%); |
65 |
| - left: 0; |
66 |
| - |
67 |
| - i { |
68 |
| - display: inline-block; |
69 |
| - vertical-align: middle; |
70 |
| - } |
71 |
| - } |
| 110 | + /** 内侧文字场景 */ |
| 111 | + &--text-inside &-bar { |
| 112 | + margin-right: 0; |
| 113 | + padding-right: 0; |
72 | 114 | }
|
73 | 115 |
|
| 116 | + /** 隐藏文字场景 */ |
74 | 117 | &--without-text &__text {
|
75 | 118 | display: none;
|
76 | 119 | }
|
|
81 | 124 | display: block;
|
82 | 125 | }
|
83 | 126 |
|
84 |
| - &--text-inside &-bar { |
85 |
| - padding-right: 0; |
86 |
| - margin-right: 0; |
87 |
| - } |
88 |
| - |
89 |
| - &-bar { |
90 |
| - width: 100%; |
91 |
| - -webkit-box-sizing: border-box; |
92 |
| - box-sizing: border-box; |
93 |
| - |
94 |
| - &__outer { |
95 |
| - height: 6px; |
96 |
| - background-color: var(--ti-progress-bar-outer-bg-color); |
97 |
| - overflow: hidden; |
98 |
| - position: relative; |
99 |
| - vertical-align: middle; |
100 |
| - } |
| 127 | + /** 圆环类型场景 */ |
| 128 | + &--circle, |
| 129 | + &--dashboard { |
| 130 | + display: inline-block; |
101 | 131 |
|
102 |
| - &__inner { |
103 |
| - background-color: var(--ti-progress-bar-inner-bg-color); |
104 |
| - text-align: right; |
105 |
| - left: 0; |
| 132 | + .@{progress-prefix-cls}__text { |
106 | 133 | position: absolute;
|
107 |
| - top: 0; |
108 |
| - height: 100%; |
109 |
| - line-height: 1; |
110 |
| - white-space: nowrap; |
111 |
| - transition: width 0.6s ease; |
| 134 | + left: 0; |
| 135 | + top: 50%; |
| 136 | + transform: translate(0, -50%); |
| 137 | + margin: 0; |
| 138 | + width: 100%; |
| 139 | + text-align: center; |
112 | 140 |
|
113 |
| - &::after { |
114 |
| - content: ''; |
115 |
| - height: 100%; |
| 141 | + i { |
| 142 | + display: inline-block; |
| 143 | + vertical-align: middle; |
116 | 144 | }
|
117 | 145 | }
|
118 |
| - |
119 |
| - &__innerText { |
120 |
| - color: var(--ti-progress-bar-inner-text-color); |
121 |
| - font-size: var(--ti-progress-text-font-size); |
122 |
| - margin: 0 5px; |
123 |
| - } |
124 |
| - |
125 |
| - &, |
126 |
| - &__inner::after, |
127 |
| - &__innerText { |
128 |
| - display: inline-block; |
129 |
| - vertical-align: middle; |
130 |
| - } |
131 | 146 | }
|
132 | 147 | }
|
133 | 148 |
|
|
0 commit comments