Lijy 2 dní pred
rodič
commit
8b77c5df98

+ 6 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/popUpWindowForSelectingPersonnel.vue

@@ -3,7 +3,7 @@
     @close="$emit('input', false)" append-to-body top="5.6vh">
     <div class="theContent">
       <div class="theContent-input">
-        <el-input placeholder="请输入内容" v-model.trim="filterText" class="input-with-select"
+        <el-input placeholder="请输入内容" ref="focusOnInput" v-model.trim="filterText" class="input-with-select"
           @keyup.enter.native="nameSearch()">
           <el-button slot="append" icon="el-icon-search" @click="nameSearch()"></el-button>
         </el-input>
@@ -69,6 +69,11 @@ export default {
   watch: {
     value(newVal) {
       this.dialogVisible = newVal
+      if(newVal) {
+        this.$nextTick(() => {
+          this.$refs.focusOnInput.focus()
+        })
+      }
     },
     filterText(val) {
       if (this.user.userNameNeedTranslate != 1) {