[new feauture] DropdownItem: add change event

This commit is contained in:
陈嘉涵
2019-05-07 20:56:23 +08:00
parent 02bcc66414
commit e9854daf29
4 changed files with 61 additions and 1 deletions

View File

@@ -50,7 +50,11 @@ export default sfc({
titleStyle={{ color: active ? activeColor : '' }}
onClick={() => {
this.show = false;
this.$emit('input', option.value);
if (option.value !== this.value) {
this.$emit('input', option.value);
this.$emit('change', option.value);
}
}}
>
{active && <Icon class={bem('icon')} color={activeColor} name="success" />}