Skip to content

Commit

Permalink
修改一些细节
Browse files Browse the repository at this point in the history
  • Loading branch information
slince-zero committed May 13, 2024
1 parent 1d9987b commit fd22e57
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
14 changes: 14 additions & 0 deletions src/page/center/dragScreenShot.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// import { useRef } from 'react'
// import domtoimage from 'dom-to-image'


const ScreenCapture = () => {
return (
<>
<div onClick={() => {console.log('ddddddd');
}}>点我</div>
</>
)
}

export default ScreenCapture
2 changes: 0 additions & 2 deletions src/page/center/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ export default function CenterBoard() {
const [isLoading, setIsLoading] = useState(false)

useEffect(() => {
console.log(imgInfo,'aaaa');

if (imgInfo?.urls != null) {
setIsLoading(true)
}
Expand Down
15 changes: 11 additions & 4 deletions src/page/right/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
PenColorLogo,
WhiteBoardLogo,
} from './write-logo'
import ScreenCapture from '../center/dragScreenShot'
export default function RightBoard() {
const {
authorValue,
Expand All @@ -59,7 +60,7 @@ export default function RightBoard() {
handleChangeBoardPenColor,
isCircle,
handleIsCircle,
setHexColor
setHexColor,
} = useContext(ImgContext)
const { handleDownloadImage } = useContext(ImageDownloadContext)

Expand All @@ -74,12 +75,11 @@ export default function RightBoard() {
// 图片比例
const img_aspect_x_list = [
// 横屏
{ label: '1 : 1', value: 'aspect-square', description: '900x900' },
{ label: '1 : 1', value: 'aspect-square', description: '450x450' },
{ label: '2 : 1', value: 'aspect-[2/1]', description: '900x450' },
{ label: '3 : 2', value: 'aspect-[3/2]', description: '900x600' },
{ label: '4 : 3', value: 'aspect-[4/3]', description: '900x675' },
{ label: '16: 9', value: 'aspect-[16/9]', description: '1600x900' },
{ label: '微信公众号', value: 'aspect-[900/383]', description: '900x383' },
]

const img_aspect_y_list = [
Expand Down Expand Up @@ -216,6 +216,13 @@ export default function RightBoard() {
</SelectItem>
))}
</SelectSection>
<SelectSection>
<SelectItem
key={'自定义'}
textValue={'自定义'}>
<ScreenCapture />
</SelectItem>
</SelectSection>
</Select>

<Select
Expand All @@ -239,7 +246,7 @@ export default function RightBoard() {
type='text'
label='遮罩'
value={hexColor}
onChange={(e)=>setHexColor(e.target.value)}
onChange={(e) => setHexColor(e.target.value)}
/>
</div>

Expand Down

0 comments on commit fd22e57

Please sign in to comment.