Explorar el Código

增加按回车搜索功能

louhangfei hace 2 años
padre
commit
0dd153be65
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      src/views/system-config/template/TitleCommon.vue

+ 4 - 2
src/views/system-config/template/TitleCommon.vue

@@ -37,7 +37,7 @@
   import { onMounted, ref, watch } from 'vue';
   import { ElMessageBox, FormInstance } from 'element-plus';
   import DrawerCommonVue, { FormModelCommon } from './DrawerCommon.vue';
-
+  import { useKeyPress } from 'vue-hooks-plus';
   export type CreateType = '添加模板' | '修改模板';
   const props = defineProps<{
     type: string;
@@ -65,7 +65,9 @@
     size: number;
     page: number;
   }
-
+  useKeyPress('enter', () => {
+    findDataByName(ruleFormRef.value);
+  });
   const titleDrawer = ref(false);
   watch(
     () => props.drawer,