From 8c52c6116ad26073db631d8aad33d7c7957dc002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Thu, 23 May 2019 03:13:50 +0800 Subject: [PATCH] fix AccountCenter block --- AccountCenter/package.json | 1 + AccountCenter/src/_mock.ts | 91 ++++++++++++++ .../src/components/Applications/index.less | 53 ++++++++ .../src/components/Applications/index.tsx | 115 ++++++++++++++++++ .../components/ArticleListContent/index.less | 38 ++++++ .../components/ArticleListContent/index.tsx | 28 +++++ .../src/components/Articles/index.less | 12 ++ .../src/components/Articles/index.tsx | 62 ++++++++++ .../src/components/AvatarList/index.less | 50 ++++++++ .../src/components/AvatarList/index.tsx | 85 +++++++++++++ .../src/components/Projects/index.less | 56 +++++++++ .../src/components/Projects/index.tsx | 52 ++++++++ AccountCenter/src/data.d.ts | 30 +++++ AccountCenter/src/index.tsx | 27 +++- AccountCenter/src/model.ts | 23 +++- AccountCenter/src/service.ts | 6 + DashboardAnalysis/src/style.less | 15 ++- ListCardList/src/data.d.ts | 4 +- ListSearchApplications/src/style.less | 15 ++- package.json | 2 +- 20 files changed, 748 insertions(+), 17 deletions(-) create mode 100644 AccountCenter/src/components/Applications/index.less create mode 100644 AccountCenter/src/components/Applications/index.tsx create mode 100644 AccountCenter/src/components/ArticleListContent/index.less create mode 100644 AccountCenter/src/components/ArticleListContent/index.tsx create mode 100644 AccountCenter/src/components/Articles/index.less create mode 100644 AccountCenter/src/components/Articles/index.tsx create mode 100644 AccountCenter/src/components/AvatarList/index.less create mode 100644 AccountCenter/src/components/AvatarList/index.tsx create mode 100644 AccountCenter/src/components/Projects/index.less create mode 100644 AccountCenter/src/components/Projects/index.tsx diff --git a/AccountCenter/package.json b/AccountCenter/package.json index b9e2f48d..835a993a 100644 --- a/AccountCenter/package.json +++ b/AccountCenter/package.json @@ -13,6 +13,7 @@ "dependencies": { "antd": "^3.16.3", "dva": "^2.4.0", + "numeral": "^2.0.6", "react": "^16.6.3", "umi-request": "^1.0.0" }, diff --git a/AccountCenter/src/_mock.ts b/AccountCenter/src/_mock.ts index 3c9ef791..6dcf4e0d 100644 --- a/AccountCenter/src/_mock.ts +++ b/AccountCenter/src/_mock.ts @@ -1,3 +1,5 @@ +import { ListItemDataType } from './data'; + const titles = [ 'Alipay', 'Angular', @@ -82,7 +84,96 @@ const getNotice = [ }, ]; +const covers = [ + 'https://gw.alipayobjects.com/zos/rmsportal/uMfMFlvUuceEyPpotzlq.png', + 'https://gw.alipayobjects.com/zos/rmsportal/iZBVOIhGJiAnhplqjvZW.png', + 'https://gw.alipayobjects.com/zos/rmsportal/iXjVmWVHbCJAyqvDxdtx.png', + 'https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png', +]; +const desc = [ + '那是一种内在的东西, 他们到达不了,也无法触及的', + '希望是一个好东西,也许是最好的,好东西是不会消亡的', + '生命就像一盒巧克力,结果往往出人意料', + '城镇中有那么多的酒馆,她却偏偏走进了我的酒馆', + '那时候我只会想自己想要什么,从不想自己拥有什么', +]; + +const user = [ + '付小小', + '曲丽丽', + '林东东', + '周星星', + '吴加好', + '朱偏右', + '鱼酱', + '乐哥', + '谭小仪', + '仲尼', +]; + +function fakeList(count: number): ListItemDataType[] { + const list = []; + for (let i = 0; i < count; i += 1) { + list.push({ + id: `fake-list-${i}`, + owner: user[i % 10], + title: titles[i % 8], + avatar: avatars[i % 8], + cover: parseInt(i / 4 + '', 10) % 2 === 0 ? covers[i % 4] : covers[3 - (i % 4)], + status: ['active', 'exception', 'normal'][i % 3] as + | 'normal' + | 'exception' + | 'active' + | 'success', + percent: Math.ceil(Math.random() * 50) + 50, + logo: avatars[i % 8], + href: 'https://ant.design', + updatedAt: new Date(new Date().getTime() - 1000 * 60 * 60 * 2 * i).getTime(), + createdAt: new Date(new Date().getTime() - 1000 * 60 * 60 * 2 * i).getTime(), + subDescription: desc[i % 5], + description: + '在中台产品的研发过程中,会出现不同的设计规范和实现方式,但其中往往存在很多类似的页面和组件,这些类似的组件会被抽离成一套标准规范。', + activeUser: Math.ceil(Math.random() * 100000) + 100000, + newUser: Math.ceil(Math.random() * 1000) + 1000, + star: Math.ceil(Math.random() * 100) + 100, + like: Math.ceil(Math.random() * 100) + 100, + message: Math.ceil(Math.random() * 10) + 10, + content: + '段落示意:蚂蚁金服设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。蚂蚁金服设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。', + members: [ + { + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png', + name: '曲丽丽', + id: 'member1', + }, + { + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png', + name: '王昭君', + id: 'member2', + }, + { + avatar: 'https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png', + name: '董娜娜', + id: 'member3', + }, + ], + }); + } + + return list; +} + +function getFakeList(req: { query: any }, res: { json: (arg0: ListItemDataType[]) => void }) { + const params = req.query; + + const count = params.count * 1 || 20; + + const result = fakeList(count); + return res.json(result); +} + export default { + 'GET /api/BLOCK_NAME/fake_list': getFakeList, // 支持值为 Object 和 Array 'GET /api/BLOCK_NAME/currentUser': { name: 'Serati Ma', diff --git a/AccountCenter/src/components/Applications/index.less b/AccountCenter/src/components/Applications/index.less new file mode 100644 index 00000000..6fa63e32 --- /dev/null +++ b/AccountCenter/src/components/Applications/index.less @@ -0,0 +1,53 @@ +@import '~antd/lib/style/themes/default.less'; + +.filterCardList { + margin-bottom: -24px; + :global { + .ant-card-meta-content { + margin-top: 0; + } + // disabled white space + .ant-card-meta-avatar { + font-size: 0; + } + .ant-card-actions { + background: #f7f9fa; + } + .ant-list .ant-list-item-content-single { + max-width: 100%; + } + } + .cardInfo { + margin-top: 16px; + margin-left: 40px; + zoom: 1; + &::before, + &::after { + display: table; + content: ' '; + } + &::after { + clear: both; + height: 0; + font-size: 0; + visibility: hidden; + } + & > div { + position: relative; + float: left; + width: 50%; + text-align: left; + p { + margin: 0; + font-size: 24px; + line-height: 32px; + } + p:first-child { + margin-bottom: 4px; + color: @text-color-secondary; + font-size: 12px; + line-height: 20px; + } + } + } +} diff --git a/AccountCenter/src/components/Applications/index.tsx b/AccountCenter/src/components/Applications/index.tsx new file mode 100644 index 00000000..7d2737f6 --- /dev/null +++ b/AccountCenter/src/components/Applications/index.tsx @@ -0,0 +1,115 @@ +import React, { Component } from 'react'; +import { List, Card, Icon, Dropdown, Menu, Avatar, Tooltip } from 'antd'; +import numeral from 'numeral'; +import { connect } from 'dva'; +import stylesApplications from './index.less'; +import { ModalState } from '../../model'; + +export function formatWan(val: number) { + const v = val * 1; + if (!v || Number.isNaN(v)) return ''; + + let result: React.ReactNode = val; + if (val > 10000) { + result = ( + + {Math.floor(val / 10000)} + + 万 + + + ); + } + return result; +} + +@connect(({ BLOCK_NAME_CAMEL_CASE }: { BLOCK_NAME_CAMEL_CASE: ModalState }) => ({ + list: BLOCK_NAME_CAMEL_CASE.list, +})) +class Applications extends Component> { + render() { + const { list } = this.props; + const itemMenu = ( + + + + 1st menu item + + + + + 2nd menu item + + + + + 3d menu item + + + + ); + const CardInfo: React.SFC<{ + activeUser: React.ReactNode; + newUser: React.ReactNode; + }> = ({ activeUser, newUser }) => ( +
+
+

活跃用户

+

{activeUser}

+
+
+

新增用户

+

{newUser}

+
+
+ ); + return ( + ( + + + + , + + + , + + + , + + + , + ]} + > + } title={item.title} /> +
+ +
+
+
+ )} + /> + ); + } +} + +export default Applications; diff --git a/AccountCenter/src/components/ArticleListContent/index.less b/AccountCenter/src/components/ArticleListContent/index.less new file mode 100644 index 00000000..dd0baa10 --- /dev/null +++ b/AccountCenter/src/components/ArticleListContent/index.less @@ -0,0 +1,38 @@ +@import '~antd/lib/style/themes/default.less'; + +.listContent { + .description { + max-width: 720px; + line-height: 22px; + } + .extra { + margin-top: 16px; + color: @text-color-secondary; + line-height: 22px; + & > :global(.ant-avatar) { + position: relative; + top: 1px; + width: 20px; + height: 20px; + margin-right: 8px; + vertical-align: top; + } + & > em { + margin-left: 16px; + color: @disabled-color; + font-style: normal; + } + } +} + +@media screen and (max-width: @screen-xs) { + .listContent { + .extra { + & > em { + display: block; + margin-top: 8px; + margin-left: 0; + } + } + } +} diff --git a/AccountCenter/src/components/ArticleListContent/index.tsx b/AccountCenter/src/components/ArticleListContent/index.tsx new file mode 100644 index 00000000..2179e13a --- /dev/null +++ b/AccountCenter/src/components/ArticleListContent/index.tsx @@ -0,0 +1,28 @@ +import React from 'react'; +import moment from 'moment'; +import { Avatar } from 'antd'; +import styles from './index.less'; + +export interface ApplicationsProps { + data: { + content?: string; + updatedAt?: any; + avatar?: string; + owner?: string; + href?: string; + }; +} +const ArticleListContent: React.SFC = ({ + data: { content, updatedAt, avatar, owner, href }, +}) => ( +
+
{content}
+
+ + {owner} 发布在 {href} + {moment(updatedAt).format('YYYY-MM-DD HH:mm')} +
+
+); + +export default ArticleListContent; diff --git a/AccountCenter/src/components/Articles/index.less b/AccountCenter/src/components/Articles/index.less new file mode 100644 index 00000000..2e51509b --- /dev/null +++ b/AccountCenter/src/components/Articles/index.less @@ -0,0 +1,12 @@ +@import '~antd/lib/style/themes/default.less'; + +.articleList { + :global { + .ant-list-item:first-child { + padding-top: 0; + } + } +} +a.listItemMetaTitle { + color: @heading-color; +} diff --git a/AccountCenter/src/components/Articles/index.tsx b/AccountCenter/src/components/Articles/index.tsx new file mode 100644 index 00000000..727bba52 --- /dev/null +++ b/AccountCenter/src/components/Articles/index.tsx @@ -0,0 +1,62 @@ +import React, { Component } from 'react'; +import { List, Icon, Tag } from 'antd'; +import { connect } from 'dva'; +import ArticleListContent from '../ArticleListContent'; +import styles from './index.less'; +import { ModalState } from '../../model'; +import { ListItemDataType } from '../../data'; + +@connect(({ BLOCK_NAME_CAMEL_CASE }: { BLOCK_NAME_CAMEL_CASE: ModalState }) => ({ + list: BLOCK_NAME_CAMEL_CASE.list, +})) +class Articles extends Component> { + render() { + const { list } = this.props; + const IconText: React.SFC<{ + type: string; + text: React.ReactNode; + }> = ({ type, text }) => ( + + + {text} + + ); + return ( + + size="large" + className={styles.articleList} + rowKey="id" + itemLayout="vertical" + dataSource={list} + renderItem={item => ( + , + , + , + ]} + > + + {item.title} + + } + description={ + + Ant Design + 设计语言 + 蚂蚁金服 + + } + /> + + + )} + /> + ); + } +} + +export default Articles; diff --git a/AccountCenter/src/components/AvatarList/index.less b/AccountCenter/src/components/AvatarList/index.less new file mode 100644 index 00000000..45904ce6 --- /dev/null +++ b/AccountCenter/src/components/AvatarList/index.less @@ -0,0 +1,50 @@ +@import '~antd/lib/style/themes/default.less'; + +.avatarList { + display: inline-block; + ul { + display: inline-block; + margin-left: 8px; + font-size: 0; + } +} + +.avatarItem { + display: inline-block; + width: @avatar-size-base; + height: @avatar-size-base; + margin-left: -8px; + font-size: @font-size-base; + :global { + .ant-avatar { + border: 1px solid #fff; + } + } +} + +.avatarItemLarge { + width: @avatar-size-lg; + height: @avatar-size-lg; +} + +.avatarItemSmall { + width: @avatar-size-sm; + height: @avatar-size-sm; +} + +.avatarItemMini { + width: 20px; + height: 20px; + :global { + .ant-avatar { + width: 20px; + height: 20px; + line-height: 20px; + + .ant-avatar-string { + font-size: 12px; + line-height: 18px; + } + } + } +} diff --git a/AccountCenter/src/components/AvatarList/index.tsx b/AccountCenter/src/components/AvatarList/index.tsx new file mode 100644 index 00000000..0e633596 --- /dev/null +++ b/AccountCenter/src/components/AvatarList/index.tsx @@ -0,0 +1,85 @@ +import React from 'react'; +import { Tooltip, Avatar } from 'antd'; +import classNames from 'classnames'; +import styles from './index.less'; + +export declare type SizeType = number | 'small' | 'default' | 'large'; + +export interface AvatarItemProps { + tips: React.ReactNode; + src: string; + size?: SizeType; + style?: React.CSSProperties; + onClick?: () => void; +} + +export interface AvatarListProps { + Item?: React.ReactElement; + size?: SizeType; + maxLength?: number; + excessItemsStyle?: React.CSSProperties; + style?: React.CSSProperties; + children: React.ReactElement | Array>; +} + +const avatarSizeToClassName = (size?: SizeType) => + classNames(styles.avatarItem, { + [styles.avatarItemLarge]: size === 'large', + [styles.avatarItemSmall]: size === 'small', + [styles.avatarItemMini]: size === 'mini', + }); + +const Item: React.SFC = ({ src, size, tips, onClick = () => {} }) => { + const cls = avatarSizeToClassName(size); + + return ( +
  • + {tips ? ( + + + + ) : ( + + )} +
  • + ); +}; + +const AvatarList: React.SFC & { Item: typeof Item } = ({ + children, + size, + maxLength = 5, + excessItemsStyle, + ...other +}) => { + const numOfChildren = React.Children.count(children); + const numToShow = maxLength >= numOfChildren ? numOfChildren : maxLength; + const childrenArray = React.Children.toArray(children) as Array< + React.ReactElement + >; + const childrenWithProps = childrenArray.slice(0, numToShow).map(child => + React.cloneElement(child, { + size, + }), + ); + + if (numToShow < numOfChildren) { + const cls = avatarSizeToClassName(size); + + childrenWithProps.push( +
  • + {`+${numOfChildren - maxLength}`} +
  • , + ); + } + + return ( +
    +
      {childrenWithProps}
    +
    + ); +}; + +AvatarList.Item = Item; + +export default AvatarList; diff --git a/AccountCenter/src/components/Projects/index.less b/AccountCenter/src/components/Projects/index.less new file mode 100644 index 00000000..d2bc5307 --- /dev/null +++ b/AccountCenter/src/components/Projects/index.less @@ -0,0 +1,56 @@ +@import '~antd/lib/style/themes/default.less'; + +.coverCardList { + margin-bottom: -24px; + + .card { + :global { + .ant-card-meta-title { + margin-bottom: 4px; + & > a { + display: inline-block; + max-width: 100%; + color: @heading-color; + } + } + .ant-card-meta-description { + height: 44px; + overflow: hidden; + line-height: 22px; + } + } + + &:hover { + :global { + .ant-card-meta-title > a { + color: @primary-color; + } + } + } + } + + .cardItemContent { + display: flex; + height: 20px; + margin-top: 16px; + margin-bottom: -4px; + line-height: 20px; + & > span { + flex: 1; + color: @text-color-secondary; + font-size: 12px; + } + .avatarList { + flex: 0 1 auto; + } + } + .cardList { + margin-top: 24px; + } + + :global { + .ant-list .ant-list-item-content-single { + max-width: 100%; + } + } +} diff --git a/AccountCenter/src/components/Projects/index.tsx b/AccountCenter/src/components/Projects/index.tsx new file mode 100644 index 00000000..918ffbb6 --- /dev/null +++ b/AccountCenter/src/components/Projects/index.tsx @@ -0,0 +1,52 @@ +import React, { Component } from 'react'; +import { List, Card } from 'antd'; +import moment from 'moment'; +import { connect } from 'dva'; +import AvatarList from '../AvatarList'; +import styles from './index.less'; +import { ModalState } from '../../model'; +import { ListItemDataType } from '../../data'; + +@connect(({ BLOCK_NAME_CAMEL_CASE }: { BLOCK_NAME_CAMEL_CASE: ModalState }) => ({ + list: BLOCK_NAME_CAMEL_CASE.list, +})) +class Projects extends Component> { + render() { + const { list } = this.props; + return ( + + className={styles.coverCardList} + rowKey="id" + grid={{ gutter: 24, xxl: 3, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }} + dataSource={list} + renderItem={item => ( + + } + > + {item.title}} description={item.subDescription} /> +
    + {moment(item.updatedAt).fromNow()} +
    + + {item.members.map(member => ( + + ))} + +
    +
    +
    +
    + )} + /> + ); + } +} + +export default Projects; diff --git a/AccountCenter/src/data.d.ts b/AccountCenter/src/data.d.ts index 0f4070e6..beba7f37 100644 --- a/AccountCenter/src/data.d.ts +++ b/AccountCenter/src/data.d.ts @@ -46,3 +46,33 @@ export interface CurrentUser { address: string; phone: string; } + +export interface Member { + avatar: string; + name: string; + id: string; +} + +export interface ListItemDataType { + id: string; + owner: string; + title: string; + avatar: string; + cover: string; + status: 'normal' | 'exception' | 'active' | 'success'; + percent: number; + logo: string; + href: string; + body?: any; + updatedAt: number; + createdAt: number; + subDescription: string; + description: string; + activeUser: number; + newUser: number; + star: number; + like: number; + message: number; + content: string; + members: Member[]; +} diff --git a/AccountCenter/src/index.tsx b/AccountCenter/src/index.tsx index 5ff12f96..c0c74928 100644 --- a/AccountCenter/src/index.tsx +++ b/AccountCenter/src/index.tsx @@ -7,6 +7,9 @@ import { Card, Row, Col, Icon, Avatar, Tag, Divider, Input } from 'antd'; import styles from './Center.less'; import { ITag, CurrentUser } from './data'; import { ModalState } from './model'; +import Articles from './components/Articles'; +import Applications from './components/Applications'; +import Projects from './components/Projects'; const operationTabList = [ { @@ -42,7 +45,7 @@ interface BLOCK_NAME_CAMEL_CASEProps extends RouteChildrenProps { } interface BLOCK_NAME_CAMEL_CASEState { newTags: ITag[]; - tabKey: string; + tabKey: 'articles' | 'applications' | 'projects'; inputVisible: boolean; inputValue: string; } @@ -95,6 +98,9 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent< dispatch({ type: 'BLOCK_NAME_CAMEL_CASE/fetchCurrent', }); + dispatch({ + type: 'BLOCK_NAME_CAMEL_CASE/fetch', + }); } onTabChange = (key: string) => { @@ -102,7 +108,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent< // const { match } = this.props; // router.push(`${match.url}/${key}`); this.setState({ - tabKey: key, + tabKey: key as BLOCK_NAME_CAMEL_CASEState['tabKey'], }); }; @@ -131,10 +137,21 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent< inputValue: '', }); }; - + renderChildrenByTabKey = (tabKey: BLOCK_NAME_CAMEL_CASEState['tabKey']) => { + if (tabKey === 'projects') { + return ; + } + if (tabKey === 'applications') { + return ; + } + if (tabKey === 'articles') { + return ; + } + return null; + }; render() { const { newTags, inputVisible, inputValue, tabKey } = this.state; - const { currentUser, currentUserLoading, children } = this.props; + const { currentUser, currentUserLoading } = this.props; const dataLoading = currentUserLoading || !(currentUser && Object.keys(currentUser).length); return ( @@ -215,7 +232,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent< activeTabKey={tabKey} onTabChange={this.onTabChange} > - {children || tabKey} + {this.renderChildrenByTabKey(tabKey)} diff --git a/AccountCenter/src/model.ts b/AccountCenter/src/model.ts index ec27747d..bf482ba9 100644 --- a/AccountCenter/src/model.ts +++ b/AccountCenter/src/model.ts @@ -1,8 +1,9 @@ -import { queryCurrent } from './service'; -import { CurrentUser } from './data'; +import { queryCurrent, queryFakeList } from './service'; +import { CurrentUser, ListItemDataType } from './data'; export interface ModalState { currentUser: Partial; + list: ListItemDataType[]; } import { Reducer } from 'redux'; @@ -19,9 +20,11 @@ export interface ModelType { state: ModalState; effects: { fetchCurrent: Effect; + fetch: Effect; }; reducers: { saveCurrentUser: Reducer; + queryList: Reducer; }; } @@ -30,6 +33,7 @@ const Model: ModelType = { state: { currentUser: {}, + list: [], }, effects: { @@ -40,15 +44,28 @@ const Model: ModelType = { payload: response, }); }, + *fetch({ payload }, { call, put }) { + const response = yield call(queryFakeList, payload); + yield put({ + type: 'queryList', + payload: Array.isArray(response) ? response : [], + }); + }, }, reducers: { saveCurrentUser(state, action) { return { - ...state, + ...state!, currentUser: action.payload || {}, }; }, + queryList(state, action) { + return { + ...state!, + list: action.payload, + }; + }, }, }; diff --git a/AccountCenter/src/service.ts b/AccountCenter/src/service.ts index d4b10c6b..71036596 100644 --- a/AccountCenter/src/service.ts +++ b/AccountCenter/src/service.ts @@ -3,3 +3,9 @@ import request from 'umi-request'; export async function queryCurrent() { return request('/api/BLOCK_NAME/currentUser'); } + +export async function queryFakeList(params: { count: number }) { + return request(`/api/BLOCK_NAME/fake_list`, { + params, + }); +} diff --git a/DashboardAnalysis/src/style.less b/DashboardAnalysis/src/style.less index e1e898e5..1967c3a6 100644 --- a/DashboardAnalysis/src/style.less +++ b/DashboardAnalysis/src/style.less @@ -1,5 +1,4 @@ @import '~antd/lib/style/themes/default.less'; -@import './utils/utils.less'; .iconGroup { i { @@ -18,11 +17,21 @@ padding: 0; list-style: none; li { - .clearfix(); - display: flex; align-items: center; margin-top: 16px; + zoom: 1; + &::before, + &::after { + display: table; + content: ' '; + } + &::after { + clear: both; + height: 0; + font-size: 0; + visibility: hidden; + } span { color: @text-color; font-size: 14px; diff --git a/ListCardList/src/data.d.ts b/ListCardList/src/data.d.ts index 7abebe61..35fbca30 100644 --- a/ListCardList/src/data.d.ts +++ b/ListCardList/src/data.d.ts @@ -1,10 +1,10 @@ -export interface member { +export interface Member { avatar: string; name: string; id: string; } -export interface cardlistitemdatatype { +export interface CardListItemDataType { id: string; owner: string; title: string; diff --git a/ListSearchApplications/src/style.less b/ListSearchApplications/src/style.less index fadbdc0b..6fa63e32 100644 --- a/ListSearchApplications/src/style.less +++ b/ListSearchApplications/src/style.less @@ -1,5 +1,4 @@ @import '~antd/lib/style/themes/default.less'; -@import './utils/utils.less'; .filterCardList { margin-bottom: -24px; @@ -19,10 +18,20 @@ } } .cardInfo { - .clearfix(); - margin-top: 16px; margin-left: 40px; + zoom: 1; + &::before, + &::after { + display: table; + content: ' '; + } + &::after { + clear: both; + height: 0; + font-size: 0; + visibility: hidden; + } & > div { position: relative; float: left; diff --git a/package.json b/package.json index b0927c90..3fbbf901 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "scripts": { - "dev": "cross-env PAGES_PATH='EditorKoni/src' umi dev", + "dev": "cross-env PAGES_PATH='AccountCenter/src' umi dev", "lint": "npm run lint:ts && npm run lint:style && npm run lint:prettier", "lint-staged": "lint-staged", "lint-staged:ts": "tslint", -- GitLab