|
7 | 7 | plain ? 'u-btn--' + type + '--plain' : '', |
8 | 8 | loading ? 'u-loading' : '', |
9 | 9 | shape == 'circle' ? 'u-round-circle' : '', |
10 | | - hairLine ? showHairLineBorder : 'u-bold-border', |
| 10 | + hairLine ? showHairLineBorder : 'u-btn--bold-border', |
11 | 11 | 'u-btn--' + type, |
12 | 12 | disabled ? `u-btn--${type}--disabled` : '', |
13 | 13 | |
|
28 | 28 | @error="error" |
29 | 29 | @opensetting="opensetting" |
30 | 30 | @launchapp="launchapp" |
31 | | - :style="[buttonStyle]" |
| 31 | + :style="[customStyle]" |
32 | 32 | @tap.stop="click($event)" |
33 | 33 | :hover-class="getHoverClass" |
34 | 34 | :loading="loading" |
@@ -209,45 +209,6 @@ export default { |
209 | 209 | hoverClass = this.plain ? 'u-' + this.type + '-plain-hover' : 'u-' + this.type + '-hover'; |
210 | 210 | return hoverClass; |
211 | 211 | }, |
212 | | - // 按钮主题 |
213 | | - buttonStyle() { |
214 | | - let style = {}; |
215 | | - // if (this.type == 'default') { |
216 | | - // if (this.disabled) { |
217 | | - // style.color = '#c0c4cc'; |
218 | | - // style.backgroundColor = '#ffffff'; |
219 | | - // style.borderColor = '#e4e7ed'; |
220 | | - // } else { |
221 | | - // style.color = this.$u.color['contentColor']; |
222 | | - // style.backgroundColor = '#ffffff'; |
223 | | - // style.borderColor = '#c0c4cc'; |
224 | | - // } |
225 | | - // } else { |
226 | | - // if (this.disabled) { |
227 | | - // if (this.plain) { |
228 | | - // style.color = this.$u.color[this.type + 'Disabled']; |
229 | | - // style.backgroundColor = this.$u.color[this.type + 'Light']; |
230 | | - // style.borderColor = this.$u.color[this.type + 'Disabled']; |
231 | | - // } else { |
232 | | - // style.color = '#ffffff'; |
233 | | - // style.backgroundColor = this.$u.color[this.type + 'Disabled']; |
234 | | - // style.borderColor = this.$u.color[this.type + 'Disabled']; |
235 | | - // } |
236 | | - // } else { |
237 | | - // if (this.plain) { |
238 | | - // style.color = this.$u.color[this.type]; |
239 | | - // style.backgroundColor = this.$u.color[this.type + 'Light']; |
240 | | - // style.borderColor = this.$u.color[this.type + 'Disabled']; |
241 | | - // } else { |
242 | | - // style.color = '#ffffff'; |
243 | | - // style.backgroundColor = this.$u.color[this.type]; |
244 | | - // style.borderColor = this.$u.color[this.type]; |
245 | | - // } |
246 | | - // } |
247 | | - // } |
248 | | -
|
249 | | - return Object.assign(style, this.customStyle); |
250 | | - }, |
251 | 212 | // 在'primary', 'success', 'error', 'warning'类型下,不显示边框,否则会造成四角有毛刺现象 |
252 | 213 | showHairLineBorder() { |
253 | 214 | if (['primary', 'success', 'error', 'warning'].indexOf(this.type) >= 0 && !this.plain) { |
@@ -374,9 +335,13 @@ export default { |
374 | 335 | box-sizing: border-box; |
375 | 336 | transition: all 0.15s; |
376 | 337 | |
| 338 | + &--bold-border { |
| 339 | + border: 1px solid #ffffff; |
| 340 | + } |
| 341 | + |
377 | 342 | &--default { |
378 | 343 | color: $u-content-color; |
379 | | - border-color: $u-type-warning; |
| 344 | + border-color: #c0c4cc; |
380 | 345 | background-color: #ffffff; |
381 | 346 | } |
382 | 347 | |
@@ -478,10 +443,6 @@ export default { |
478 | 443 | z-index: 1; |
479 | 444 | } |
480 | 445 |
|
481 | | -.u-bold-border { |
482 | | - border: 1px solid #ffffff; |
483 | | -} |
484 | | -
|
485 | 446 | .u-wave-ripple { |
486 | 447 | z-index: 0; |
487 | 448 | position: absolute; |
|
0 commit comments