Skip to content

Commit

Permalink
feat(devtools): set z-index to avoid be covered (#5083)
Browse files Browse the repository at this point in the history
  • Loading branch information
Asuka109 authored Dec 13, 2023
1 parent d9fe6e6 commit 859fca0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/red-stingrays-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/devtools-client': patch
---

feat(devtools): set z-index to avoid be covered
feat(devtools): 设置 z-index 以避免被覆盖
4 changes: 4 additions & 0 deletions packages/devtools/client/src/entries/mount/index.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.container {
position: relative;
z-index: 9999;
}
7 changes: 6 additions & 1 deletion packages/devtools/client/src/entries/mount/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import { parseQuery } from 'ufo';
import _ from 'lodash';
import { SetupClientParams } from '@modern-js/devtools-kit';
import { waitClientConnection } from './rpc';
import styles from './index.module.scss';
import { DevtoolsActionButton } from '@/components/Devtools/Action';

// @ts-expect-error
const { container, resourceQuery } = window._modern_js_devtools_app;
const { container, resourceQuery } = window._modern_js_devtools_app as {
container: HTMLDivElement;
resourceQuery: string;
};
container.classList.add(styles.container);
const root = createRoot(container);
const parsed = parseQuery(resourceQuery);
if (
Expand Down

0 comments on commit 859fca0

Please sign in to comment.