parent
0446ac3d75
commit
6641a36622
@ -0,0 +1,29 @@
|
|||||||
|
export type Member = {
|
||||||
|
avatar: string;
|
||||||
|
name: string;
|
||||||
|
id: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type CardListItemDataType = {
|
||||||
|
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[];
|
||||||
|
};
|
@ -0,0 +1,10 @@
|
|||||||
|
import { request } from 'umi';
|
||||||
|
import type { CardListItemDataType } from './data.d';
|
||||||
|
|
||||||
|
export async function queryFakeList(params: {
|
||||||
|
count: number;
|
||||||
|
}): Promise<{ data: { list: CardListItemDataType[] } }> {
|
||||||
|
return request('/api/card_fake_list', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,153 @@
|
|||||||
|
@import '~antd/es/style/themes/default.less';
|
||||||
|
@import './utils/utils.less';
|
||||||
|
|
||||||
|
.cardList {
|
||||||
|
.card {
|
||||||
|
:global {
|
||||||
|
.ant-card-meta-title {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
& > a {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 100%;
|
||||||
|
color: @heading-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-card-body:hover {
|
||||||
|
.ant-card-meta-title > a {
|
||||||
|
color: @primary-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item {
|
||||||
|
height: 64px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
:global {
|
||||||
|
|
||||||
|
.ant-list .ant-list-item-content-single {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
.ant-list-items{
|
||||||
|
display: block;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.ant-list-bordered .ant-list-item{
|
||||||
|
display: inline-block;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 0;
|
||||||
|
.ant-typography:hover{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.ant-typography{
|
||||||
|
color:#999999;
|
||||||
|
border: #CCCCCC 1px solid;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-weight: bolder;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
span{
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 18px;
|
||||||
|
padding: 8px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
mark{
|
||||||
|
margin: -1px;
|
||||||
|
border: #1890ff 1px solid;
|
||||||
|
border-radius: 5px;
|
||||||
|
color: #1890ff;
|
||||||
|
display: block;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
background-color: #e6f7ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.extraImg {
|
||||||
|
width: 155px;
|
||||||
|
margin-top: -20px;
|
||||||
|
text-align: center;
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.newButton {
|
||||||
|
width: 100%;
|
||||||
|
height: 201px;
|
||||||
|
color: @text-color-secondary;
|
||||||
|
background-color: @component-background;
|
||||||
|
border-color: @border-color-base;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardAvatar {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardDescription {
|
||||||
|
.textOverflowMulti();
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageHeaderContent {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentLink {
|
||||||
|
margin-top: 16px;
|
||||||
|
a {
|
||||||
|
margin-right: 32px;
|
||||||
|
img {
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
margin-right: 8px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-lg) {
|
||||||
|
.contentLink {
|
||||||
|
a {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width: @screen-md) {
|
||||||
|
.extraImg {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: @screen-sm) {
|
||||||
|
.pageHeaderContent {
|
||||||
|
padding-bottom: 30px;
|
||||||
|
}
|
||||||
|
.contentLink {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -4px;
|
||||||
|
left: 0;
|
||||||
|
width: 1000px;
|
||||||
|
a {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
.textOverflow() {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textOverflowMulti(@line: 3, @bg: #fff) {
|
||||||
|
position: relative;
|
||||||
|
max-height: @line * 1.5em;
|
||||||
|
margin-right: -1em;
|
||||||
|
padding-right: 1em;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 1.5em;
|
||||||
|
text-align: justify;
|
||||||
|
&::before {
|
||||||
|
position: absolute;
|
||||||
|
right: 14px;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 0 1px;
|
||||||
|
background: @bg;
|
||||||
|
content: '...';
|
||||||
|
}
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
right: 14px;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
margin-top: 0.2em;
|
||||||
|
background: white;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// mixins for clearfix
|
||||||
|
// ------------------------
|
||||||
|
.clearfix() {
|
||||||
|
zoom: 1;
|
||||||
|
&::before,
|
||||||
|
&::after {
|
||||||
|
display: table;
|
||||||
|
content: ' ';
|
||||||
|
}
|
||||||
|
&::after {
|
||||||
|
clear: both;
|
||||||
|
height: 0;
|
||||||
|
font-size: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue