fix(Search): add update:modelValue emits (#7872)

This commit is contained in:
Mikasa33
2021-01-11 17:37:14 +08:00
committed by GitHub
parent 597122117e
commit ec1aef91de

View File

@@ -36,7 +36,7 @@ export default createComponent({
},
},
emits: ['search', 'cancel'],
emits: ['update:modelValue', 'search', 'cancel'],
setup(props, { emit, slots, attrs }) {
const filedRef = ref();
@@ -109,6 +109,10 @@ export default createComponent({
style: null,
class: null,
};
const onInput = (value) => {
emit('update:modelValue', value);
};
return (
<Field
@@ -118,6 +122,7 @@ export default createComponent({
border={false}
onKeypress={onKeypress}
{...fieldAttrs}
{...{ 'onUpdate:modelValue': onInput }}
/>
);
};