Showing
1 changed file
with
7 additions
and
1 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-11-01 10:18:53 | 2 | * @Date: 2023-11-01 10:18:53 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-12-11 16:18:45 | 4 | + * @LastEditTime: 2024-06-27 14:40:05 |
| 5 | * @FilePath: /vue-flow-editor/doc/selectUserView.vue | 5 | * @FilePath: /vue-flow-editor/doc/selectUserView.vue |
| 6 | * @Description: 成员列表选择控件 | 6 | * @Description: 成员列表选择控件 |
| 7 | --> | 7 | --> |
| ... | @@ -67,6 +67,7 @@ | ... | @@ -67,6 +67,7 @@ |
| 67 | </div> | 67 | </div> |
| 68 | <div v-else> | 68 | <div v-else> |
| 69 | <el-input | 69 | <el-input |
| 70 | + ref="refSearchInput" | ||
| 70 | v-model="search_input" | 71 | v-model="search_input" |
| 71 | @input="onSearchInput" | 72 | @input="onSearchInput" |
| 72 | class="search-btn-wrapper" | 73 | class="search-btn-wrapper" |
| ... | @@ -745,10 +746,15 @@ const confirmUserForm = () => { | ... | @@ -745,10 +746,15 @@ const confirmUserForm = () => { |
| 745 | * | 746 | * |
| 746 | * @return {void} No return value. | 747 | * @return {void} No return value. |
| 747 | */ | 748 | */ |
| 749 | +const refSearchInput = ref(null); | ||
| 748 | const activeSearchBtn = () => { | 750 | const activeSearchBtn = () => { |
| 749 | is_active_search.value = !is_active_search.value; | 751 | is_active_search.value = !is_active_search.value; |
| 750 | search_input.value = ''; | 752 | search_input.value = ''; |
| 751 | searchUserList.value = {}; | 753 | searchUserList.value = {}; |
| 754 | + // 自动聚焦 | ||
| 755 | + nextTick(() => { | ||
| 756 | + refSearchInput.value.focus() | ||
| 757 | + }) | ||
| 752 | }; | 758 | }; |
| 753 | 759 | ||
| 754 | /** | 760 | /** | ... | ... |
-
Please register or login to post a comment