diff --git a/CHANGELOG.md b/CHANGELOG.md index df832505..32e11e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ ## 版本更新日志 +## v0.1.7 + +- 修复 date-picker 最值bug +- 修复 picker modal click bug +- 新增 picker close-on-click-modal 属性 ## v0.1.6 diff --git a/example/components/pickerPage.vue b/example/components/pickerPage.vue index b32835e1..4bf05a38 100644 --- a/example/components/pickerPage.vue +++ b/example/components/pickerPage.vue @@ -8,6 +8,7 @@ ", "tags": [ diff --git a/src/picker/src/picker.vue b/src/picker/src/picker.vue index 49821f1d..e568ff9a 100644 --- a/src/picker/src/picker.vue +++ b/src/picker/src/picker.vue @@ -12,7 +12,11 @@ [`${prefixCls}-container`]: true, [customCls]: !!customCls, }' @click.stop='() => {}'> - +
{{cancelText}}
@@ -107,6 +111,10 @@ export default { type: String, default: 'value', }, + closeOnClickModal: { + type: Boolean, + default: true, + }, // custom value generator: receive value displayGenerator: Function, customCls: String, @@ -207,8 +215,10 @@ export default { }, onPopupClose(reason) { if (reason === 'clickaway') { - this.currentVisible = !this.currentVisible; - this.$emit('update:visible', this.currentVisible); + this.toggle(); + this.currentValue = this.oldValue; + // this.currentVisible = !this.currentVisible; + // this.$emit('update:visible', this.currentVisible); } }, handleCancel(event) {