feat(Search): add blur method

This commit is contained in:
chenjiahan
2020-11-21 19:01:10 +08:00
parent 2833bc03f5
commit d26282e542
4 changed files with 11 additions and 1 deletions
+7 -1
View File
@@ -88,6 +88,12 @@ export default createComponent({
}
};
const blur = () => {
if (filedRef.value) {
filedRef.value.blur();
}
};
const fieldPropNames = [
'leftIcon',
'rightIcon',
@@ -116,7 +122,7 @@ export default createComponent({
);
};
useExpose({ focus });
useExpose({ focus, blur });
return () => (
<div