Skip to content

Commit

Permalink
优化样式
Browse files Browse the repository at this point in the history
  • Loading branch information
greatanimalion committed Sep 1, 2024
1 parent 9b23c58 commit 93c1472
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
10 changes: 5 additions & 5 deletions dist/content/content.js

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

2 changes: 1 addition & 1 deletion dist/contentPage/contentPage.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/contentPage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="modulepreload" crossorigin href="/js/ButtonBase-8la9PwCJ.js">
<link rel="stylesheet" crossorigin href="/assets/contentPage-BULgnV61.css">
</head>
<body>
<body>111
<div id="root"></div>
<script></script>
</body>
Expand Down
13 changes: 5 additions & 8 deletions src/contentPage/components/ElemenetMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
// import { Button, Input } from "@mui/material";

import { Fab } from "@mui/material";
// import { Fab } from "@mui/material";
import { useEffect, useState } from "react";

export const ElementMessage = () => {
const [obj, setObj] = useState();
useEffect(() => {
window.addEventListener('message', (e) => {
console.log(e.data);
setObj(e.data)
}, false)
})

let e=obj?Object.keys(obj!):[];
let i=e.map((item,index)=>{
return <p key={index}><strong style={{ color: 'blue' }}>{item}:</strong>{obj![item]}</p>
if(index==0)return <p key={index} style={{"fontFamily": "cursive","marginBottom":"10px"}}>
<strong style={{ color: '#616161' }}>{item}:</strong>{obj![item]}</p>
return <p key={index} style={{"fontFamily": "cursive","backgroundColor":" #ececec","padding":"10px","margin":"5px 0","borderRadius": "5px"}}>
<strong style={{ color: '#616161' }}>{item}:</strong>{obj![item]}</p>
})
return <>
<div style={{ marginTop: '48px' }}>
<Fab color="primary" aria-label="add" style={{ position: "fixed", right: 10, height: 47, width: 47 }}>
复制
</Fab>

{i}

</div>
Expand Down
2 changes: 1 addition & 1 deletion src/contentPage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
</style>
</head>
<body>
<body>111
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
<script></script>
Expand Down

0 comments on commit 93c1472

Please sign in to comment.