mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[new feauture] DropdownItem: add change event
This commit is contained in:
@@ -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" />}
|
||||
|
Reference in New Issue
Block a user