Skip to content

Commit

Permalink
🐛fix debug
Browse files Browse the repository at this point in the history
  • Loading branch information
greatanimalion committed Aug 25, 2024
1 parent 79f6bfe commit b55844c
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 24 deletions.
1 change: 1 addition & 0 deletions dist/assets/contentPage-2Ad86H11.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#app{width:261px;margin:5px auto 0;height:376px;padding:5px;background-color:#fff;border-radius:3px;box-shadow:0 0 7px 1px #a5a5a5}*{margin:0;padding:0}
1 change: 1 addition & 0 deletions dist/assets/contentPage-BV2zDvp8.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#app{width:300px;margin:0 auto;height:300px;padding:5px;background-color:#fff;border-radius:3px;box-shadow:0 0 7px 1px #a5a5a5}#drag-icon{height:30px;width:280px;margin:0 auto;text-align:center}*{margin:0;padding:0}
1 change: 1 addition & 0 deletions dist/assets/contentPage-DUXoFcG4.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#app{width:280px;margin:0 auto;height:400px;padding:5px;background-color:#fff;border-radius:3px;box-shadow:0 0 7px 1px #a5a5a5}#drag-icon{height:30px;width:280px;margin:0 auto;text-align:center}*{margin:0;padding:0}
6 changes: 3 additions & 3 deletions dist/content/content.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/contentPage/contentPage.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/contentPage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<title>Measuring Tools</title>
<script type="module" crossorigin src="/contentPage/contentPage.js"></script>
<link rel="modulepreload" crossorigin href="/js/client-C9r4PM53.js">
<link rel="modulepreload" crossorigin href="/js/iframe-B894oyg8.js">
<link rel="stylesheet" crossorigin href="/assets/contentPage-DjRRTzIV.css">
<link rel="stylesheet" crossorigin href="/assets/contentPage-2Ad86H11.css">
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 1 addition & 2 deletions src/content/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ let preEl: Element | null = null

const MeasureTools = (event: MouseEvent) => {
let cur = document.elementFromPoint(event.clientX, event.clientY)!
if(cur.tagName === 'IFRAME')return
if(cur&&cur.tagName === 'IFRAME')return
if (cur !== preEl) {
preEl && preEl.classList.remove(timeS)
preEl = cur
cur && cur.classList.add(timeS)
console.log(preEl)
}
}
//@ts-ignore
Expand Down
12 changes: 5 additions & 7 deletions src/contentPage/App.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#app {
width: 261px;
margin: 0 auto;
height: 376px;
padding: 5px;
background-color: rgb(255, 255, 255);
margin-top: 5px;
background-color: #fff;
border-radius: 3px;
box-shadow: 0 0 7px 1px #a5a5a5;
}
#drag-icon{
height: 30px;
width: 280px;
margin: 0 auto;
text-align: center;
}

* {
margin: 0;
padding: 0;
Expand Down
20 changes: 14 additions & 6 deletions src/contentPage/App.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import './App.css'
import { iframe } from '../const/iframe';

import { DragOutlined } from '@ant-design/icons';
export default function App() {
const drag = () => {

}
return <>
<div id="app" style={{ width: iframe.width, height: iframe.height }}>
<div id='drag-icon'><DragOutlined onClick={drag} style={{ fontSize: '24px', color: 'rgb(53, 150, 235)', cursor: "grab" }} /></div>
<div>当前元素信息</div>
<div>
<div id="app">
<div id='drag-icon'>
<DragOutlined
//@ts-ignore
onMouseDown={(e) => {e.target.style.cursor = 'grabbing'}}
// @ts-ignore
onMouseUp={(e) => e.target.style.cursor = 'grab'}
style={{ float: 'right', fontSize: '15px', color: 'rgb(53, 150, 235)', cursor: "grab" }} />
</div>
<div>当前元素信息</div>
</div>
</div>

</>;
}

0 comments on commit b55844c

Please sign in to comment.