-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(login、global):修改了全局样式,添加了登录页二维码弹窗
- Loading branch information
Showing
3 changed files
with
65 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; // 引入 React | ||
|
||
// 定义 GeneralModal 组件,接收 isOpen 和 children 作为 props | ||
const GeneralModal = ({ isOpen, onClick, children }: { isOpen: boolean, onClick: () => void | null, children: React.ReactNode }) => { | ||
// 如果 isOpen 是 false,则不显示模态框,直接返回 null | ||
if (!isOpen) { | ||
return null; | ||
} | ||
|
||
// 定义 modalClass 函数,返回模态框的样式类名字符串 | ||
const modalClass = (): string => { | ||
// 返回样式类名字符串 | ||
return "w-80 h-80"; | ||
} | ||
|
||
// 渲染模态框 | ||
return ( | ||
<div className="fixed top-0 left-0 w-full h-full flex justify-center items-center bg-white z-101"> | ||
{/* 模态框 */} | ||
<div className={"rounded-3px border border-gray-300 shadow-md relative " + modalClass()}> | ||
{/* 返回按钮 */} | ||
|
||
{/* 模态框的内容 */} | ||
{children} | ||
<div className='w-15 shrink-0 b-1 border-black flex mt-100% ml-80% border-rd-10 justify-center'> | ||
<button onClick={onClick} className='text-4'>返回</button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default GeneralModal; // 导出 GeneralModal 组件 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
@unocss all; | ||
|
||
html{ | ||
font-size: 2.6667vw; | ||
font-size: 4.26672vw; | ||
} | ||
body { | ||
padding: 0; | ||
|