保持命名统一,将 allowClear 修改为了 clearable

This commit is contained in:
Aresn 2018-05-03 11:54:13 +08:00 committed by GitHub
parent 5225898202
commit e9528eed93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@
name: { name: {
type: String type: String
}, },
allowClear: { clearable: {
type: Boolean, type: Boolean,
default: false default: false
} }
@ -130,7 +130,7 @@
//value++; //value++;
if (this.isHalf) value -= 0.5; if (this.isHalf) value -= 0.5;
if(this.allowClear && Math.abs(value - this.currentValue) < 0.01) { if(this.clearable && Math.abs(value - this.currentValue) < 0.01) {
value = 0; value = 0;
} }