Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbaca5da

Browse files
committed
fix: layout absolute
1 parent3bbcfd1 commitbaca5da

File tree

7 files changed

+22
-5
lines changed

7 files changed

+22
-5
lines changed

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"dob-react-devtools",
3-
"version":"1.0.3",
3+
"version":"1.0.4",
44
"description":"",
55
"main":"built/index.js",
66
"scripts": {

‎src/components/icon/src/icons/light-bulb-on.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import * as React from "react"
22

33
exportdefault(size:number)=>(
44
<svgviewBox="0 0 1024 1024"width={size}height={size}>
5-
<pathd="M729.938 212.714l-0.003 0c-55.078-55.079-128.312-85.413-206.206-85.413s-151.127 30.334-206.205 85.413c-55.08 55.079-85.414 128.311-85.414 206.206 0 52.019 13.874 103.09 40.122 147.693 22.929 38.963 54.736 72.189 92.545 96.82l0 142.25c0 37.059 30.147 67.207 67.206 67.207l183.143 0c37.058 0 67.207-30.148 67.207-67.207L682.333 663.666c37.901-24.614 69.787-57.851 92.784-96.86 26.32-44.65 40.234-95.79 40.234-147.886C815.35 341.025 785.017 267.793 729.938 212.714z"fill="#f4ea2a"p-id="3155"></path><pathd="M612.407 905.014 435.049 905.014c-14.129 0-25.583 11.454-25.583 25.583s11.454 25.583 25.583 25.583l177.358 0c14.13 0 25.583-11.454 25.583-25.583S626.537 905.014 612.407 905.014z"fill="#f4ea2a"/>
5+
<pathd="M729.938 212.714l-0.003 0c-55.078-55.079-128.312-85.413-206.206-85.413s-151.127 30.334-206.205 85.413c-55.08 55.079-85.414 128.311-85.414 206.206 0 52.019 13.874 103.09 40.122 147.693 22.929 38.963 54.736 72.189 92.545 96.82l0 142.25c0 37.059 30.147 67.207 67.206 67.207l183.143 0c37.058 0 67.207-30.148 67.207-67.207L682.333 663.666c37.901-24.614 69.787-57.851 92.784-96.86 26.32-44.65 40.234-95.79 40.234-147.886C815.35 341.025 785.017 267.793 729.938 212.714z"fill="#f4ea2a"></path><pathd="M612.407 905.014 435.049 905.014c-14.129 0-25.583 11.454-25.583 25.583s11.454 25.583 25.583 25.583l177.358 0c14.13 0 25.583-11.454 25.583-25.583S626.537 905.014 612.407 905.014z"fill="#f4ea2a"/>
66
</svg>
77
)

‎src/components/icon/src/icons/scatter.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import * as React from "react"
22

33
exportdefault(size:number)=>(
44
<svgviewBox="0 0 1024 1024"width={size}height={size}>
5-
<pathd="M713.955556 816.355556c36.977778 0 65.422222-28.444444 65.422222-65.422223s-28.444444-65.422222-65.422222-65.422222c-36.977778 0-65.422222 28.444444-65.422223 65.422222s31.288889 65.422222 65.422223 65.422223M392.533333 332.8c28.444444 0 54.044444-22.755556 54.044445-54.044444 0-28.444444-22.755556-54.044444-54.044445-54.044445s-51.2 28.444444-51.2 56.888889 22.755556 51.2 51.2 51.2M193.422222 455.111111c14.222222 0 25.6-11.377778 25.6-25.6s-11.377778-25.6-25.6-25.6-25.6 11.377778-25.6 25.6 11.377778 25.6 25.6 25.6M457.955556 881.777778c28.444444 0 48.355556-22.755556 48.355555-48.355556 0-28.444444-22.755556-48.355556-48.355555-48.355555-28.444444 0-48.355556 22.755556-48.355556 48.355555 0 25.6 22.755556 48.355556 48.355556 48.355556"p-id="8005"></path><pathd="M267.377778 748.088889c-34.133333 0-59.733333-28.444444-59.733334-59.733333 0-34.133333 28.444444-59.733333 59.733334-59.733334s59.733333 28.444444 59.733333 59.733334c0 34.133333-28.444444 59.733333-59.733333 59.733333m238.933333-59.733333c-65.422222 0-119.466667-54.044444-119.466667-119.466667s54.044444-119.466667 119.466667-119.466667S625.777778 503.466667 625.777778 568.888889s-51.2 119.466667-119.466667 119.466667m213.333333-361.244445c-51.2 0-91.022222-39.822222-91.022222-91.022222s39.822222-91.022222 91.022222-91.022222c51.2 0 91.022222 39.822222 91.022223 91.022222s-42.666667 91.022222-91.022223 91.022222m93.866667 241.777778c-34.133333 0-59.733333-28.444444-59.733333-59.733333 0-34.133333 28.444444-59.733333 59.733333-59.733334 34.133333 0 59.733333 28.444444 59.733333 59.733334s-25.6 59.733333-59.733333 59.733333"/>
5+
<pathd="M713.955556 816.355556c36.977778 0 65.422222-28.444444 65.422222-65.422223s-28.444444-65.422222-65.422222-65.422222c-36.977778 0-65.422222 28.444444-65.422223 65.422222s31.288889 65.422222 65.422223 65.422223M392.533333 332.8c28.444444 0 54.044444-22.755556 54.044445-54.044444 0-28.444444-22.755556-54.044444-54.044445-54.044445s-51.2 28.444444-51.2 56.888889 22.755556 51.2 51.2 51.2M193.422222 455.111111c14.222222 0 25.6-11.377778 25.6-25.6s-11.377778-25.6-25.6-25.6-25.6 11.377778-25.6 25.6 11.377778 25.6 25.6 25.6M457.955556 881.777778c28.444444 0 48.355556-22.755556 48.355555-48.355556 0-28.444444-22.755556-48.355556-48.355555-48.355555-28.444444 0-48.355556 22.755556-48.355556 48.355555 0 25.6 22.755556 48.355556 48.355556 48.355556"></path><pathd="M267.377778 748.088889c-34.133333 0-59.733333-28.444444-59.733334-59.733333 0-34.133333 28.444444-59.733333 59.733334-59.733334s59.733333 28.444444 59.733333 59.733334c0 34.133333-28.444444 59.733333-59.733333 59.733333m238.933333-59.733333c-65.422222 0-119.466667-54.044444-119.466667-119.466667s54.044444-119.466667 119.466667-119.466667S625.777778 503.466667 625.777778 568.888889s-51.2 119.466667-119.466667 119.466667m213.333333-361.244445c-51.2 0-91.022222-39.822222-91.022222-91.022222s39.822222-91.022222 91.022222-91.022222c51.2 0 91.022222 39.822222 91.022223 91.022222s-42.666667 91.022222-91.022223 91.022222m93.866667 241.777778c-34.133333 0-59.733333-28.444444-59.733333-59.733333 0-34.133333 28.444444-59.733333 59.733333-59.733334 34.133333 0 59.733333 28.444444 59.733333 59.733334s-25.6 59.733333-59.733333 59.733333"/>
66
</svg>
77
)

‎src/debug-wrapper/debug-box/debug-box.style.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const borderAnimation = keyframes`
2323
`;
2424

2525
exportconstContainer=styled.div`
26-
26+
pointer-events: all;
2727
`
2828

2929
exportconstHighLightBox=styled.div`

‎src/debug-wrapper/debug-wrapper.component.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { IDebugInfo } from 'dob'
66
import*asSfrom'./debug-wrapper.style'
77
import{globalState}from'dob-react'
88
import{Props,State}from'./debug-wrapper.type'
9+
import{debugContainerId}from'../utils/isomorphic'
910

1011
import{DebugBox}from'./debug-box/debug-box.component'
1112

@@ -58,7 +59,8 @@ export class DebugWrapper extends React.PureComponent<Props, State>{
5859
publiccomponentDidMount(){
5960
// 渲染与当前组件一一对应的高亮节点
6061
this.debugContainer=document.createElement("div")
61-
document.querySelector('body').appendChild(this.debugContainer)
62+
this.debugContainer.style.position='absolute'
63+
document.querySelector('#'+debugContainerId).appendChild(this.debugContainer)
6264
ReactDOM.render(
6365
<DebugBox
6466
ref={ref=>{

‎src/tool-box/tool-box.component.tsx‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as PropTypes from 'prop-types'
77

88
import{Props,State}from'./tool-box.type'
99
import*asSfrom'./tool-box.style'
10+
import{debugContainerId}from'../utils/isomorphic'
1011

1112
import{DebugLine}from'./debug-line/debug-line.component'
1213

@@ -32,6 +33,19 @@ export class ToolBox extends React.PureComponent<Props, State>{
3233
*/
3334
privateactionContainerDOM:HTMLElement=null
3435

36+
componentWillMount(){
37+
// 在 body 下创建一个放置 debug-box 的节点
38+
constdebugContainer=document.createElement("div")
39+
debugContainer.id=debugContainerId
40+
debugContainer.style.position='absolute'
41+
debugContainer.style.top='0px'
42+
debugContainer.style.right='0px'
43+
debugContainer.style.bottom='0px'
44+
debugContainer.style.left='0px'
45+
debugContainer.style.pointerEvents='none'
46+
document.querySelector('body').appendChild(debugContainer)
47+
}
48+
3549
getChildContext(){
3650
return{
3751
dyDebug:this.context.dyDebug

‎src/utils/isomorphic.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exportconstdebugContainerId='dobDebugContainer'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp