Browse Source

chore: update lock file

pull/10914/head
期贤 3 years ago
parent
commit
22d7518257
  1. 8
      config/routes.ts
  2. 9
      package.json
  3. 8
      src/components/RightContent/index.tsx
  4. 2
      src/pages/account/center/components/Applications/index.tsx
  5. 2
      src/pages/account/center/components/ArticleListContent/index.tsx
  6. 2
      src/pages/account/center/components/Articles/index.less
  7. 6
      src/pages/account/center/components/Articles/index.style.ts
  8. 2
      src/pages/account/center/components/AvatarList/index.style.ts
  9. 3
      src/pages/account/settings/components/PhoneView.tsx
  10. 3
      src/pages/account/settings/components/base.tsx
  11. 0
      src/pages/account/settings/components/index.less
  12. 0
      src/pages/account/settings/components/index.style.ts
  13. 4
      src/pages/account/settings/style.style.ts
  14. 2
      src/pages/dashboard/analysis/components/Charts/ChartCard/index.style.ts
  15. 8
      src/pages/dashboard/analysis/components/NumberInfo/index.style.ts
  16. 8
      src/pages/dashboard/analysis/components/Trend/index.style.ts
  17. 14
      src/pages/dashboard/analysis/style.style.ts
  18. 89
      src/pages/dashboard/workplace/style.style.ts
  19. 2
      src/pages/form/advanced-form/style.style.ts
  20. 2
      src/pages/form/step-form/index.tsx
  21. 4
      src/pages/list/basic-list/index.tsx
  22. 8
      src/pages/list/basic-list/utils/utils.style.ts
  23. 8
      src/pages/list/card-list/utils/utils.style.ts
  24. 2
      src/pages/list/search/applications/components/StandardFormRow/index.style.ts
  25. 8
      src/pages/list/search/applications/components/TagSelect/index.style.ts
  26. 2
      src/pages/list/search/applications/index.tsx
  27. 8
      src/pages/list/search/applications/utils/utils.style.ts
  28. 2
      src/pages/list/search/articles/components/ArticleListContent/index.tsx
  29. 2
      src/pages/list/search/articles/components/StandardFormRow/index.style.ts
  30. 8
      src/pages/list/search/articles/components/TagSelect/index.style.ts
  31. 270
      src/pages/list/search/articles/index.tsx
  32. 2
      src/pages/list/search/articles/style.less
  33. 22
      src/pages/list/search/articles/style.style.ts
  34. 2
      src/pages/list/search/projects/components/AvatarList/index.style.ts
  35. 11
      src/pages/list/search/projects/components/AvatarList/index.tsx
  36. 2
      src/pages/list/search/projects/components/StandardFormRow/index.style.ts
  37. 8
      src/pages/list/search/projects/components/TagSelect/index.style.ts
  38. 1
      src/pages/list/search/projects/index.tsx
  39. 8
      src/pages/list/search/projects/utils/utils.style.ts
  40. 11
      src/pages/profile/advanced/index.tsx
  41. 27
      src/pages/user/register-result/index.tsx
  42. 39
      src/pages/user/register/index.tsx
  43. 14
      tsconfig.json

8
config/routes.ts

@ -19,23 +19,23 @@ export default [
path: '/user/login',
layout: false,
name: 'login',
component: './User/Login',
component: './user/Login',
},
{
path: '/user',
redirect: '/User/login',
redirect: '/user/login',
},
{
name: 'register-result',
icon: 'smile',
path: '/user/register-result',
component: './User/register-result',
component: './user/register-result',
},
{
name: 'register',
icon: 'smile',
path: '/user/register',
component: './User/register',
component: './user/register',
},
{
component: '404',

9
package.json

@ -12,9 +12,6 @@
"i18n-remove": "pro i18n-remove --locale=zh-CN --write",
"postinstall": "max setup",
"jest": "jest",
"lint": "npm run lint:js && npm run lint:prettier && npm run tsc",
"lint-staged": "lint-staged",
"lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
"lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src ",
"lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
"lint:prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\" --end-of-line auto",
@ -34,12 +31,6 @@
"test:update": "npm run jest -- -u",
"tsc": "tsc --noEmit"
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
"**/*.{js,jsx,tsx,ts,less,md,json}": [
"prettier --write"
]
},
"browserslist": [
"> 1%",
"last 2 versions",

8
src/components/RightContent/index.tsx

@ -5,13 +5,7 @@ import React from 'react';
export type SiderTheme = 'light' | 'dark';
export const SelectLang = () => {
return (
<UmiSelectLang
style={{
padding: 4,
}}
/>
);
return <UmiSelectLang />;
};
export const Question = () => {

2
src/pages/account/center/components/Applications/index.tsx

@ -114,7 +114,7 @@ const Applications: React.FC = () => {
]}
>
<Card.Meta avatar={<Avatar size="small" src={item.avatar} />} title={item.title} />
<div className={stylesApplications.cardItemContent}>
<div>
<CardInfo
activeUser={formatWan(item.activeUser)}
newUser={numeral(item.newUser).format('0,0')}

2
src/pages/account/center/components/ArticleListContent/index.tsx

@ -16,7 +16,7 @@ const ArticleListContent: React.FC<ApplicationsProps> = ({
}) => {
const { styles } = useStyles();
return (
<div className={styles.listContent}>
<div>
<div className={styles.description}>{content}</div>
<div className={styles.extra}>
<Avatar src={avatar} size="small" />

2
src/pages/account/center/components/Articles/index.less

@ -7,6 +7,6 @@
}
}
}
a.listItemMetaTitle {
.listItemMetaTitle {
color: @heading-color;
}

6
src/pages/account/center/components/Articles/index.style.ts

@ -1,11 +1,11 @@
import { createStyles } from "antd-style";
import { createStyles } from 'antd-style';
const useStyles = createStyles(({ token }) => {
return {
articleList: {
".ant-list-item:first-child": { paddingTop: "0" },
'.ant-list-item:first-child': { paddingTop: '0' },
},
"a.listItemMetaTitle": {
listItemMetaTitle: {
color: token.colorTextHeading,
},
};

2
src/pages/account/center/components/AvatarList/index.style.ts

@ -12,7 +12,7 @@ const useStyles = createStyles(({ token }) => {
height: token.controlHeight,
marginLeft: "-8px",
fontSize: token.fontSize,
".ant-avatar": { border: "1px solid @border-color-base" },
".ant-avatar": { border: `1px solid ${token.colorBorder}` },
},
avatarItemLarge: {
width: token.controlHeightLG,

3
src/pages/account/settings/components/PhoneView.tsx

@ -1,6 +1,7 @@
import React from 'react';
import { Input } from 'antd';
import useStyles from './PhoneView.style';
import useStyles from './index.style';
type PhoneViewProps = {
value?: string;
onChange?: (value: string) => void;

3
src/pages/account/settings/components/base.tsx

@ -12,7 +12,8 @@ import {
import { useRequest } from '@umijs/max';
import { queryCurrent } from '../service';
import { queryProvince, queryCity } from '../service';
import useStyles from './BaseView.style';
import useStyles from './index.style';
const validatorPhone = (rule: any, value: string[], callback: (message?: string) => void) => {
if (!value[0]) {
callback('Please input your area code!');

0
src/pages/account/settings/components/BaseView.less → src/pages/account/settings/components/index.less

0
src/pages/account/settings/components/BaseView.style.ts → src/pages/account/settings/components/index.style.ts

4
src/pages/account/settings/style.style.ts

@ -10,7 +10,7 @@ const useStyles = createStyles(({ token }) => {
paddingBottom: "16px",
backgroundColor: token.colorBgContainer,
".ant-list-split .ant-list-item:last-child": {
borderBottom: "1px solid @border-color-split",
borderBottom: `1px solid ${token.colorSplit}`,
},
".ant-list-item": { paddingTop: "14px", paddingBottom: "14px" },
[`@media screen and (max-width: ${token.screenMD}px)`]: {
@ -19,7 +19,7 @@ const useStyles = createStyles(({ token }) => {
},
leftMenu: {
width: "224px",
borderRight: `${token.lineWidth} ${token.borderStyle} ${token.colorSplit}`,
borderRight: `${token.lineWidth}px solid ${token.colorSplit}`,
".ant-menu-inline": { border: "none" },
".ant-menu-horizontal": { fontWeight: "bold" },
[`@media screen and (max-width: ${token.screenMD}px)`]: {

2
src/pages/dashboard/analysis/components/Charts/ChartCard/index.style.ts

@ -65,7 +65,7 @@ const useStyles = createStyles(({ token }) => {
footer: {
marginTop: "8px",
paddingTop: "9px",
borderTop: "1px solid @border-color-split",
borderTop: `1px solid ${token.colorSplit}`,
"& > *": { position: "relative" },
},
footerMargin: {

8
src/pages/dashboard/analysis/components/NumberInfo/index.style.ts

@ -11,7 +11,7 @@ const useStyles = createStyles(({ token }) => {
numberInfoTitle: {
marginBottom: "16px",
color: token.colorText,
fontSize: token.fontSizeLg,
fontSize: token["font-size-lg"],
transition: "all 0.3s",
},
numberInfoSubTitle: {
@ -36,7 +36,7 @@ const useStyles = createStyles(({ token }) => {
subTotal: {
marginRight: "0",
color: token.colorTextSecondary,
fontSize: token.fontSizeLg,
fontSize: token["font-size-lg"],
verticalAlign: "top",
},
anticon: {
@ -45,10 +45,10 @@ const useStyles = createStyles(({ token }) => {
transform: "scale(0.82)",
},
"anticon-caret-up": {
color: token.red6,
color: token["red-6"],
},
"anticon-caret-down": {
color: token.green6,
color: token["green-6"],
},
};
});

8
src/pages/dashboard/analysis/components/Trend/index.style.ts

@ -8,20 +8,20 @@ const useStyles = createStyles(({ token }) => {
lineHeight: "22px",
},
up: {
color: token.red6,
color: token["red-6"],
},
down: {
top: "-1px",
color: token.green6,
color: token["green-6"],
},
"trendItemGrey .up, trendItemGrey .down": {
color: token.colorText,
},
"reverseColor .up": {
color: token.green6,
color: token["green-6"],
},
"reverseColor .down": {
color: token.red6,
color: token["red-6"],
},
};
});

14
src/pages/dashboard/analysis/style.style.ts

@ -37,10 +37,6 @@ const useStyles = createStyles(({ token }) => {
fontSize: "14px",
lineHeight: "22px",
},
active: {
color: "#fff",
backgroundColor: "#314659",
},
},
[`@media screen and (max-width: ${token.screenLG}px)`]: {
li: {
@ -58,7 +54,7 @@ const useStyles = createStyles(({ token }) => {
fontSize: "12px",
lineHeight: "20px",
textAlign: "center",
backgroundColor: token.tagDefaultBg,
backgroundColor: "#F9F9F9",
borderRadius: "20px",
},
rankingItemTitle: {
@ -68,6 +64,10 @@ const useStyles = createStyles(({ token }) => {
whiteSpace: "nowrap",
textOverflow: "ellipsis",
},
active: {
color: "#fff",
backgroundColor: "#314659",
},
salesExtra: {
display: "inline-block",
marginRight: "24px",
@ -78,11 +78,13 @@ const useStyles = createStyles(({ token }) => {
color: token.colorPrimary,
},
},
currentDate: { color: token.colorPrimary },
[`@media screen and (max-width: ${token.screenLG}px)`]: {
display: "none",
},
},
currentDate: {
color: token.colorPrimary,
},
salesBar: {
padding: "0 0 32px 32px",
[`@media screen and (max-width: ${token.screenMD}px)`]: {

89
src/pages/dashboard/workplace/style.style.ts

@ -2,16 +2,6 @@ import { createStyles } from "antd-style";
const useStyles = createStyles(({ token }) => {
return {
"clearfix()": {
zoom: "1",
"&::before, &::after": { display: "table", content: "' '" },
"&::after": {
clear: "both",
height: "0",
fontSize: "0",
visibility: "hidden",
},
},
activitiesList: {
padding: "0 24px 8px 24px",
},
@ -128,30 +118,10 @@ const useStyles = createStyles(({ token }) => {
margin: "12px 0",
color: token.colorText,
transition: "all 0.3s",
position: "relative",
maxHeight: "4.5em",
marginRight: "-1em",
paddingRight: "1em",
overflow: "hidden",
lineHeight: "1.5em",
textAlign: "justify",
"&::before": {
position: "absolute",
right: "14px",
bottom: "0",
padding: "0 1px",
background: token.colorBgContainer,
content: "'...'",
},
"&::after": {
position: "absolute",
right: "14px",
width: "1em",
height: "1em",
marginTop: "0.2em",
background: "white",
content: "''",
},
whiteSpace: "nowrap",
textOverflow: "ellipsis",
wordBreak: "break-all",
"&:hover": {
color: token.colorPrimary,
},
@ -202,57 +172,18 @@ const useStyles = createStyles(({ token }) => {
marginTop: "8px",
overflow: "hidden",
fontSize: "12px",
lineHeight: "1.5em",
position: "relative",
maxHeight: "4.5em",
marginRight: "-1em",
paddingRight: "1em",
textAlign: "justify",
"&::before": {
position: "absolute",
right: "14px",
bottom: "0",
padding: "0 1px",
background: token.colorBgContainer,
content: "'...'",
},
"&::after": {
position: "absolute",
right: "14px",
width: "1em",
height: "1em",
marginTop: "0.2em",
background: "white",
content: "''",
},
lineHeight: "20px",
whiteSpace: "nowrap",
textOverflow: "ellipsis",
wordBreak: "break-all",
a: {
display: "inline-block",
flex: "1 1 0",
color: token.colorTextSecondary,
position: "relative",
maxHeight: "4.5em",
marginRight: "-1em",
paddingRight: "1em",
overflow: "hidden",
lineHeight: "1.5em",
textAlign: "justify",
"&::before": {
position: "absolute",
right: "14px",
bottom: "0",
padding: "0 1px",
background: token.colorBgContainer,
content: "'...'",
},
"&::after": {
position: "absolute",
right: "14px",
width: "1em",
height: "1em",
marginTop: "0.2em",
background: "white",
content: "''",
},
whiteSpace: "nowrap",
textOverflow: "ellipsis",
wordBreak: "break-all",
"&:hover": {
color: token.colorPrimary,
},

2
src/pages/form/advanced-form/style.style.ts

@ -28,7 +28,7 @@ const useStyles = createStyles(({ token }) => {
errorListItem: {
padding: "8px 16px",
listStyle: "none",
borderBottom: "1px solid @border-color-split",
borderBottom: `1px solid ${token.colorSplit}`,
cursor: "pointer",
transition: "all 0.3s",
"&:hover": { background: token.colorBgTextActive },

2
src/pages/form/step-form/index.tsx

@ -221,7 +221,7 @@ const StepForm: React.FC<Record<string, any>> = () => {
margin: '40px 0 24px',
}}
/>
<div className={styles.desc}>
<div>
<h3></h3>
<h4></h4>
<p>

4
src/pages/list/basic-list/index.tsx

@ -46,7 +46,7 @@ const ListContent = ({
}) => {
const { styles } = useStyles();
return (
<div className={styles.listContent}>
<div>
<div className={styles.listContentItem}>
<span>Owner</span>
<p>{owner}</p>
@ -128,7 +128,7 @@ export const BasicList: FC = () => {
}
};
const extraContent = (
<div className={styles.extraContent}>
<div>
<RadioGroup defaultValue="all">
<RadioButton value="all"></RadioButton>
<RadioButton value="progress"></RadioButton>

8
src/pages/list/basic-list/utils/utils.style.ts

@ -1,12 +1,6 @@
import { createStyles } from 'antd-style';
const useStyles = createStyles(() => {
return {
'clearfix()': {
zoom: '1',
'&::before, &::after': { display: 'table', content: "' '" },
'&::after': { clear: 'both', height: '0', fontSize: '0', visibility: 'hidden' },
},
};
return {};
});
export default useStyles;

8
src/pages/list/card-list/utils/utils.style.ts

@ -1,12 +1,6 @@
import { createStyles } from 'antd-style';
const useStyles = createStyles(() => {
return {
'clearfix()': {
zoom: '1',
'&::before, &::after': { display: 'table', content: "' '" },
'&::after': { clear: 'both', height: '0', fontSize: '0', visibility: 'hidden' },
},
};
return {};
});
export default useStyles;

2
src/pages/list/search/applications/components/StandardFormRow/index.style.ts

@ -6,7 +6,7 @@ const useStyles = createStyles(({ token }) => {
display: "flex",
marginBottom: "16px",
paddingBottom: "16px",
borderBottom: "1px dashed @border-color-split",
borderBottom: `1px dashed ${token.colorSplit}`,
".ant-form-item, .ant-legacy-form-item": { marginRight: "24px" },
".ant-form-item-label, .ant-legacy-form-item-label": {
label: {

8
src/pages/list/search/applications/components/TagSelect/index.style.ts

@ -16,16 +16,16 @@ const useStyles = createStyles(({ token }) => {
fontSize: token.fontSize,
},
},
expanded: {
maxHeight: "200px",
transition: "all 0.3s",
},
trigger: {
position: "absolute",
top: "0",
right: "0",
"span.anticon": { fontSize: "12px" },
},
expanded: {
maxHeight: "200px",
transition: "all 0.3s",
},
hasExpandTag: {
paddingRight: "50px",
},

2
src/pages/list/search/applications/index.tsx

@ -197,7 +197,7 @@ export const Applications: FC<Record<string, any>> = () => {
]}
>
<Card.Meta avatar={<Avatar size="small" src={item.avatar} />} title={item.title} />
<div className={styles.cardItemContent}>
<div>
<CardInfo
activeUser={formatWan(item.activeUser)}
newUser={numeral(item.newUser).format('0,0')}

8
src/pages/list/search/applications/utils/utils.style.ts

@ -1,12 +1,6 @@
import { createStyles } from 'antd-style';
const useStyles = createStyles(() => {
return {
'clearfix()': {
zoom: '1',
'&::before, &::after': { display: 'table', content: "' '" },
'&::after': { clear: 'both', height: '0', fontSize: '0', visibility: 'hidden' },
},
};
return {};
});
export default useStyles;

2
src/pages/list/search/articles/components/ArticleListContent/index.tsx

@ -16,7 +16,7 @@ const ArticleListContent: React.FC<ArticleListContentProps> = ({
}) => {
const { styles } = useStyles();
return (
<div className={styles.listContent}>
<div>
<div className={styles.description}>{content}</div>
<div className={styles.extra}>
<Avatar src={avatar} size="small" />

2
src/pages/list/search/articles/components/StandardFormRow/index.style.ts

@ -7,7 +7,7 @@ const useStyles = createStyles(({ token }) => {
width: "100%",
marginBottom: "16px",
paddingBottom: "16px",
borderBottom: "1px dashed @border-color-split",
borderBottom: `1px dashed ${token.colorSplit}`,
".ant-form-item, .ant-legacy-form-item": { marginRight: "24px" },
".ant-form-item-label, .ant-legacy-form-item-label": {
label: {

8
src/pages/list/search/articles/components/TagSelect/index.style.ts

@ -16,16 +16,16 @@ const useStyles = createStyles(({ token }) => {
fontSize: token.fontSize,
},
},
expanded: {
maxHeight: "200px",
transition: "all 0.3s",
},
trigger: {
position: "absolute",
top: "0",
right: "0",
"span.anticon": { fontSize: "12px" },
},
expanded: {
maxHeight: "200px",
transition: "all 0.3s",
},
hasExpandTag: {
paddingRight: "50px",
},

270
src/pages/list/search/articles/index.tsx

@ -1,270 +0,0 @@
import { LikeOutlined, LoadingOutlined, MessageOutlined, StarOutlined } from '@ant-design/icons';
import { Button, Card, Col, Form, List, Row, Select, Tag } from 'antd';
import type { FC } from 'react';
import React from 'react';
import { useRequest } from '@umijs/max';
import ArticleListContent from './components/ArticleListContent';
import StandardFormRow from './components/StandardFormRow';
import TagSelect from './components/TagSelect';
import type { ListItemDataType } from './data.d';
import { queryFakeList } from './service';
import useStyles from './style.style';
const { Option } = Select;
const FormItem = Form.Item;
const pageSize = 5;
const Articles: FC = () => {
const { styles } = useStyles();
const [form] = Form.useForm();
const { data, reload, loading, loadMore, loadingMore } = useRequest(
() => {
return queryFakeList({
count: pageSize,
});
},
{
loadMore: true,
},
);
const list = data?.list || [];
const setOwner = () => {
form.setFieldsValue({
owner: ['wzj'],
});
};
const owners = [
{
id: 'wzj',
name: '我自己',
},
{
id: 'wjh',
name: '吴家豪',
},
{
id: 'zxx',
name: '周星星',
},
{
id: 'zly',
name: '赵丽颖',
},
{
id: 'ym',
name: '姚明',
},
];
const IconText: React.FC<{
type: string;
text: React.ReactNode;
}> = ({ type, text }) => {
switch (type) {
case 'star-o':
return (
<span>
<StarOutlined
style={{
marginRight: 8,
}}
/>
{text}
</span>
);
case 'like-o':
return (
<span>
<LikeOutlined
style={{
marginRight: 8,
}}
/>
{text}
</span>
);
case 'message':
return (
<span>
<MessageOutlined
style={{
marginRight: 8,
}}
/>
{text}
</span>
);
default:
return null;
}
};
const formItemLayout = {
wrapperCol: {
xs: {
span: 24,
},
sm: {
span: 24,
},
md: {
span: 12,
},
},
};
const loadMoreDom = list.length > 0 && (
<div
style={{
textAlign: 'center',
marginTop: 16,
}}
>
<Button
onClick={loadMore}
style={{
paddingLeft: 48,
paddingRight: 48,
}}
>
{loadingMore ? (
<span>
<LoadingOutlined /> ...
</span>
) : (
'加载更多'
)}
</Button>
</div>
);
return (
<>
<Card bordered={false}>
<Form
layout="inline"
form={form}
initialValues={{
owner: ['wjh', 'zxx'],
}}
onValuesChange={reload}
>
<StandardFormRow
title="所属类目"
block
style={{
paddingBottom: 11,
}}
>
<FormItem name="category">
<TagSelect expandable>
<TagSelect.Option value="cat1"></TagSelect.Option>
<TagSelect.Option value="cat2"></TagSelect.Option>
<TagSelect.Option value="cat3"></TagSelect.Option>
<TagSelect.Option value="cat4"></TagSelect.Option>
<TagSelect.Option value="cat5"></TagSelect.Option>
<TagSelect.Option value="cat6"></TagSelect.Option>
<TagSelect.Option value="cat7"></TagSelect.Option>
<TagSelect.Option value="cat8"></TagSelect.Option>
<TagSelect.Option value="cat9"></TagSelect.Option>
<TagSelect.Option value="cat10"></TagSelect.Option>
<TagSelect.Option value="cat11"></TagSelect.Option>
<TagSelect.Option value="cat12"></TagSelect.Option>
</TagSelect>
</FormItem>
</StandardFormRow>
<StandardFormRow title="owner" grid>
<FormItem name="owner" noStyle>
<Select
mode="multiple"
placeholder="选择 owner"
style={{
minWidth: '6rem',
}}
>
{owners.map((owner) => (
<Option key={owner.id} value={owner.id}>
{owner.name}
</Option>
))}
</Select>
</FormItem>
<a className={styles.selfTrigger} onClick={setOwner}>
</a>
</StandardFormRow>
<StandardFormRow title="其它选项" grid last>
<Row gutter={16}>
<Col xl={8} lg={10} md={12} sm={24} xs={24}>
<FormItem {...formItemLayout} label="活跃用户" name="user">
<Select
placeholder="不限"
style={{
maxWidth: 200,
width: '100%',
}}
>
<Option value="lisa"></Option>
</Select>
</FormItem>
</Col>
<Col xl={8} lg={10} md={12} sm={24} xs={24}>
<FormItem {...formItemLayout} label="好评度" name="rate">
<Select
placeholder="不限"
style={{
maxWidth: 200,
width: '100%',
}}
>
<Option value="good"></Option>
</Select>
</FormItem>
</Col>
</Row>
</StandardFormRow>
</Form>
</Card>
<Card
style={{
marginTop: 24,
}}
bordered={false}
bodyStyle={{
padding: '8px 32px 32px 32px',
}}
>
<List<ListItemDataType>
size="large"
loading={loading}
rowKey="id"
itemLayout="vertical"
loadMore={loadMoreDom}
dataSource={list}
renderItem={(item) => (
<List.Item
key={item.id}
actions={[
<IconText key="star" type="star-o" text={item.star} />,
<IconText key="like" type="like-o" text={item.like} />,
<IconText key="message" type="message" text={item.message} />,
]}
extra={<div className={styles.listItemExtra} />}
>
<List.Item.Meta
title={
<a className={styles.listItemMetaTitle} href={item.href}>
{item.title}
</a>
}
description={
<span>
<Tag>Ant Design</Tag>
<Tag></Tag>
<Tag></Tag>
</span>
}
/>
<ArticleListContent data={item} />
</List.Item>
)}
/>
</Card>
</>
);
};
export default Articles;

2
src/pages/list/search/articles/style.less

@ -1,6 +1,6 @@
@import '~antd/es/style/themes/default.less';
a.listItemMetaTitle {
.listItemMetaTitle {
color: @heading-color;
}
.listItemExtra {

22
src/pages/list/search/articles/style.style.ts

@ -1,27 +1,27 @@
import { createStyles } from "antd-style";
import { createStyles } from 'antd-style';
const useStyles = createStyles(({ token }) => {
return {
"a.listItemMetaTitle": {
listItemMetaTitle: {
color: token.colorTextHeading,
},
listItemExtra: {
width: "272px",
height: "1px",
width: '272px',
height: '1px',
[`@media screen and (max-width: ${token.screenLG}px)`]: {
width: "0",
height: "1px",
width: '0',
height: '1px',
},
},
selfTrigger: {
marginLeft: "12px",
marginLeft: '12px',
[`@media screen and (max-width: ${token.screenXS}px)`]: {
display: "block",
marginLeft: "0",
display: 'block',
marginLeft: '0',
},
[`@media screen and (max-width: ${token.screenMD}px)`]: {
display: "block",
marginLeft: "0",
display: 'block',
marginLeft: '0',
},
},
};

2
src/pages/list/search/projects/components/AvatarList/index.style.ts

@ -12,7 +12,7 @@ const useStyles = createStyles(({ token }) => {
height: token.controlHeight,
marginLeft: "-8px",
fontSize: token.fontSize,
".ant-avatar": { border: "1px solid @border-color-base" },
".ant-avatar": { border: `1px solid ${token.colorBorder}` },
},
avatarItemLarge: {
width: token.controlHeightLG,

11
src/pages/list/search/projects/components/AvatarList/index.tsx

@ -18,14 +18,18 @@ export type AvatarListProps = {
style?: React.CSSProperties;
children: React.ReactElement<AvatarItemProps> | React.ReactElement<AvatarItemProps>[];
};
const avatarSizeToClassName = (size?: SizeType | 'mini') =>
const avatarSizeToClassName = (size: SizeType | 'mini', styles: any) =>
classNames(styles.avatarItem, {
[styles.avatarItemLarge]: size === 'large',
[styles.avatarItemSmall]: size === 'small',
[styles.avatarItemMini]: size === 'mini',
});
const Item: React.FC<AvatarItemProps> = ({ src, size, tips, onClick = () => {} }) => {
const cls = avatarSizeToClassName(size);
const { styles } = useStyles();
const cls = avatarSizeToClassName(size!, styles);
return (
<li className={cls} onClick={onClick}>
{tips ? (
@ -51,13 +55,14 @@ const AvatarList: React.FC<AvatarListProps> & {
const numOfChildren = React.Children.count(children);
const numToShow = maxLength >= numOfChildren ? numOfChildren : maxLength;
const childrenArray = React.Children.toArray(children) as React.ReactElement<AvatarItemProps>[];
const childrenWithProps = childrenArray.slice(0, numToShow).map((child) =>
React.cloneElement(child, {
size,
}),
);
if (numToShow < numOfChildren) {
const cls = avatarSizeToClassName(size);
const cls = avatarSizeToClassName(size!, styles);
childrenWithProps.push(
<li key="exceed" className={cls}>
<Avatar size={size} style={excessItemsStyle}>{`+${numOfChildren - maxLength}`}</Avatar>

2
src/pages/list/search/projects/components/StandardFormRow/index.style.ts

@ -7,7 +7,7 @@ const useStyles = createStyles(({ token }) => {
width: "100%",
marginBottom: "16px",
paddingBottom: "16px",
borderBottom: "1px dashed @border-color-split",
borderBottom: `1px dashed ${token.colorSplit}`,
".ant-form-item, .ant-legacy-form-item": { marginRight: "24px" },
".ant-form-item-label, .ant-legacy-form-item-label": {
label: {

8
src/pages/list/search/projects/components/TagSelect/index.style.ts

@ -16,16 +16,16 @@ const useStyles = createStyles(({ token }) => {
fontSize: token.fontSize,
},
},
expanded: {
maxHeight: "200px",
transition: "all 0.3s",
},
trigger: {
position: "absolute",
top: "0",
right: "0",
"span.anticon": { fontSize: "12px" },
},
expanded: {
maxHeight: "200px",
transition: "all 0.3s",
},
hasExpandTag: {
paddingRight: "50px",
},

1
src/pages/list/search/projects/index.tsx

@ -44,7 +44,6 @@ const Projects: FC = () => {
title={<a>{item.title}</a>}
description={
<Paragraph
className={styles.item}
ellipsis={{
rows: 2,
}}

8
src/pages/list/search/projects/utils/utils.style.ts

@ -1,12 +1,6 @@
import { createStyles } from 'antd-style';
const useStyles = createStyles(() => {
return {
'clearfix()': {
zoom: '1',
'&::before, &::after': { display: 'table', content: "' '" },
'&::after': { clear: 'both', height: '0', fontSize: '0', visibility: 'hidden' },
},
};
return {};
});
export default useStyles;

11
src/pages/profile/advanced/index.tsx

@ -155,7 +155,7 @@ const Advanced: FC = () => {
</RouteContext.Consumer>
);
const desc1 = (
<div className={classNames(styles.textSecondary, styles.stepDescription)}>
<div className={classNames(styles.stepDescription)}>
<Fragment>
<DingdingOutlined
@ -205,7 +205,6 @@ const Advanced: FC = () => {
>
<span
className={styles.textSecondary}
style={{
float: 'right',
}}
@ -224,7 +223,6 @@ const Advanced: FC = () => {
/>
</span>
<div
className={styles.textSecondary}
style={{
marginTop: 4,
}}
@ -434,12 +432,7 @@ const Advanced: FC = () => {
>
<Empty />
</Card>
<Card
className={styles.tabsCard}
bordered={false}
tabList={operationTabList}
onTabChange={onOperationTabChange}
>
<Card bordered={false} tabList={operationTabList} onTabChange={onOperationTabChange}>
{contentList[tabStatus.operationKey] as React.ReactNode}
</Card>
</GridContent>

27
src/pages/user/register-result/index.tsx

@ -2,21 +2,24 @@ import { Button, Result } from 'antd';
import { Link, useSearchParams } from '@umijs/max';
import React from 'react';
import useStyles from './style.style';
const actions = (
<div className={styles.actions}>
<a href="">
<Button size="large" type="primary">
<span></span>
</Button>
</a>
<Link to="/">
<Button size="large"></Button>
</Link>
</div>
);
const RegisterResult: React.FC<Record<string, unknown>> = () => {
const { styles } = useStyles();
const [params] = useSearchParams();
const actions = (
<div className={styles.actions}>
<a href="">
<Button size="large" type="primary">
<span></span>
</Button>
</a>
<Link to="/">
<Button size="large"></Button>
</Link>
</div>
);
const email = params?.get('account') || 'AntDesign@example.com';
return (
<Result

39
src/pages/user/register/index.tsx

@ -6,26 +6,11 @@ import { Link, useRequest, history } from '@umijs/max';
import type { StateType } from './service';
import { fakeRegister } from './service';
import useStyles from './style.style';
const FormItem = Form.Item;
const { Option } = Select;
const InputGroup = Input.Group;
const passwordStatusMap = {
ok: (
<div className={styles.success}>
<span></span>
</div>
),
pass: (
<div className={styles.warning}>
<span></span>
</div>
),
poor: (
<div className={styles.error}>
<span></span>
</div>
),
};
const passwordProgressMap: {
ok: 'success';
pass: 'normal';
@ -43,6 +28,25 @@ const Register: FC = () => {
const [popover, setPopover]: [boolean, any] = useState(false);
const confirmDirty = false;
let interval: number | undefined;
const passwordStatusMap = {
ok: (
<div className={styles.success}>
<span></span>
</div>
),
pass: (
<div className={styles.warning}>
<span></span>
</div>
),
poor: (
<div className={styles.error}>
<span></span>
</div>
),
};
const [form] = Form.useForm();
useEffect(
() => () => {
@ -124,7 +128,6 @@ const Register: FC = () => {
<div className={styles[`progress-${passwordStatus}`]}>
<Progress
status={passwordProgressMap[passwordStatus]}
className={styles.progress}
strokeWidth={6}
percent={value.length * 10 > 100 ? 100 : value.length * 10}
showInfo={false}

14
tsconfig.json

@ -1,18 +1,18 @@
{
"compilerOptions": {
"baseUrl": "./",
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"jsx": "preserve",
"jsx": "react-jsx",
"esModuleInterop": true,
"sourceMap": true,
"baseUrl": "./",
"skipLibCheck": true,
"experimentalDecorators": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"declaration": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"paths": {
"@/*": ["./src/*"],
"@@/*": ["./src/.umi/*"],

Loading…
Cancel
Save