Slider: mitigate high cpu usage (#8989)

see: https://github.com/ElemeFE/element/issues/8989
pull/9053/head
wacky6.AriesMBP 2017-12-26 23:25:36 +08:00 committed by 杨奕
parent bd616e37b6
commit b0c382f2f8
1 changed files with 1 additions and 0 deletions

View File

@ -260,6 +260,7 @@
computed: {
stops() {
if (!this.showStops) return [];
if (this.step === 0) {
process.env.NODE_ENV !== 'production' &&
console.warn('[Element Warn][Slider]step should not be 0.');