-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ynnnny/main
style: modify style
- Loading branch information
Showing
68 changed files
with
3,580 additions
and
3,310 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 |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = {extends: ['@commitlint/config-conventional']} | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
module.exports = { | ||
semi: true, | ||
singleQuote: true, | ||
"arrowParens": "always", | ||
printWidth: 90, | ||
tabWidth: 2, | ||
endOfLine: 'auto', | ||
semi: true, | ||
singleQuote: true, | ||
arrowParens: 'always', | ||
printWidth: 90, | ||
tabWidth: 2, | ||
endOfLine: 'auto', | ||
}; |
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="zh"> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<link rel="icon" href="/muxilogo.ico"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/muxilogo.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>MuxiFresh</title> | ||
<style> | ||
* { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
* { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface AdminFilter { | ||
grade: string; | ||
group: Group; | ||
school: string; | ||
status: string; | ||
} | ||
|
||
export enum Group { | ||
All = 'All', | ||
// Android = 'Android', | ||
Backend = 'Backend', | ||
Design = 'Design', | ||
Frontend = 'Frontend', | ||
Product = 'Product', | ||
} |
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 |
---|---|---|
|
@@ -13,4 +13,8 @@ | |
border-radius: 0.5vw; | ||
padding: 5vh 0 5vh 0; | ||
} | ||
} | ||
} | ||
|
||
.selectGroup { | ||
margin: 2vw; | ||
} |
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
31 changes: 31 additions & 0 deletions
31
src/pages/AuthorityManage/components/AdminLists/SelectGroup/SelectGroup.less
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,31 @@ | ||
.reviewGroupSelect { | ||
width: 20vw; | ||
height: 540px; | ||
margin-top: 3vh; | ||
border-radius: 0.5vw; | ||
box-shadow: 0 5px 10px #d4d4d4; | ||
background-color: #ffffff; | ||
display: flex; | ||
justify-content: space-evenly; | ||
flex-direction: column; | ||
color: #818181; | ||
font-size: 1.2vw; | ||
transform: translateY(-11%); | ||
|
||
.reviewGroupSelectTitle { | ||
padding: 0 2.5vw; | ||
box-sizing: border-box; | ||
} | ||
|
||
.reviewGroups { | ||
height: 8vh; | ||
display: flex; | ||
justify-content: start; | ||
align-items: center; | ||
color: #818181; | ||
padding-left: 2.5vw; | ||
box-sizing: border-box; | ||
font-size: 1.08vw; | ||
cursor: pointer; | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
src/pages/AuthorityManage/components/AdminLists/SelectGroup/SelectGroup.tsx
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,63 @@ | ||
import './SelectGroup.less'; | ||
import React, { useCallback, useMemo, useState } from 'react'; | ||
import { Group, AdminFilter } from '../../../AdminFilter'; | ||
import { ConfigProvider, Menu } from 'antd'; | ||
|
||
type ReviewGroupSelectProps = { | ||
adminFilter: AdminFilter; | ||
changeGroup(group: Group): void; | ||
}; | ||
|
||
const SelectGroup: React.FC<ReviewGroupSelectProps> = ({ adminFilter, changeGroup }) => { | ||
const groups = useMemo( | ||
() => [Group.All, Group.Product, Group.Frontend, Group.Backend, Group.Design], | ||
[], | ||
); | ||
const chineseGroups: { [key in Group]: string } = { | ||
// Android: '安卓组', | ||
All: '全部', | ||
Backend: '后端组', | ||
Design: '设计组', | ||
Frontend: '前端组', | ||
Product: '产品组', | ||
}; | ||
|
||
const [selectedGroup, setSelectedGroup] = useState<Group>(adminFilter.group); | ||
|
||
const handleChange = useCallback( | ||
(group: Group) => { | ||
setSelectedGroup(group); | ||
changeGroup(group); | ||
}, | ||
[changeGroup], | ||
); | ||
|
||
return ( | ||
<div className={'reviewGroupSelect'}> | ||
<div className={'reviewGroupSelectTitle'}>选择组别</div> | ||
<ConfigProvider | ||
theme={{ | ||
components: { | ||
Menu: { | ||
itemHeight: 76, | ||
}, | ||
}, | ||
}} | ||
> | ||
<Menu | ||
// mode="inline" | ||
selectedKeys={[selectedGroup]} | ||
onClick={(e) => handleChange(e.key as Group)} | ||
items={groups.map((group) => ({ | ||
key: group, | ||
title: chineseGroups[group], | ||
label: <div className={'reviewGroups'}>{chineseGroups[group]}</div>, | ||
}))} | ||
style={{ height: '400px', textAlign: 'center' }} | ||
/> | ||
</ConfigProvider> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SelectGroup; |
Oops, something went wrong.