mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 01:54:48 +00:00
fix(Search): add update:modelValue emits (#7872)
This commit is contained in:
@@ -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 }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user