Parcourir la source

失去焦点触发

DESKTOP-MINPJAU\Administrator il y a 3 ans
Parent
commit
30c8f288dd
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      src/components/xc/select/XcSelect.vue

+ 5 - 1
src/components/xc/select/XcSelect.vue

@@ -140,7 +140,11 @@ const focus = () => {
   xcselect.focus()
 }
 
-defineExpose({focus})
+const blur = () => {
+  xcselect.blur()
+}
+
+defineExpose({focus, blur})
 
 onMounted(() => {
   // 判断组件是否使用了 slot