DatePicker: fix prevent clear value when readonly is true, fixed #1238 (#1326)

pull/1347/head
cinwell.li 2016-11-24 14:14:02 +08:00 committed by FuryBean
parent 2f6750964e
commit 066eaf123e
1 changed files with 2 additions and 0 deletions

View File

@ -328,12 +328,14 @@ export default {
methods: { methods: {
handleMouseEnterIcon() { handleMouseEnterIcon() {
if (this.readonly || this.disabled) return;
if (!this.valueIsEmpty) { if (!this.valueIsEmpty) {
this.showClose = true; this.showClose = true;
} }
}, },
handleClickIcon() { handleClickIcon() {
if (this.readonly || this.disabled) return;
if (this.valueIsEmpty) { if (this.valueIsEmpty) {
this.pickerVisible = !this.pickerVisible; this.pickerVisible = !this.pickerVisible;
} else { } else {