Skip to content

Commit

Permalink
#15
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Apr 18, 2024
1 parent 02cd160 commit 0ffa1c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const SearchComponent = {
onMounted(() => {
const rootElement = document.querySelector(`.layout__center [data-type="wnd"].layout__wnd--active > .layout-tab-container`);
if (rootElement) {
const inputElement = rootElement.querySelector(`.${CLASS_NAME} .search-dialog .b3-text-field`);
const inputElement = rootElement.querySelector(`.layout__center [data-type="wnd"].layout__wnd--active > .layout-tab-container .${CLASS_NAME} .search-dialog .b3-text-field`);
if (inputElement) {
setTimeout(() => { // 等待一小段时间确保元素加载完全
inputElement.focus();
Expand Down

0 comments on commit 0ffa1c4

Please sign in to comment.