Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-admin
Commits
ab4b92fd
Commit
ab4b92fd
authored
Dec 29, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复布局变形的问题
parent
a3ad5bf8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
74 deletions
+75
-74
index.tsx
src/components/MellowCard/index.tsx
+75
-74
index.tsx
src/pages/member/components/SincerityInfo/index.tsx
+0
-0
No files found.
src/components/MellowCard/index.tsx
View file @
ab4b92fd
/*
* @Author: XieZhiXiong
* @Date: 2020-08-26 17:32:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-
09-29 14:47:49
* @Description: 基于 antd Card 封装的适合项目 UI 的 Card,使用方式跟 antd Card 一样,这里只是修改了样式
*/
import
React
from
'react'
;
import
{
Card
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
{
CardProps
}
from
'antd/lib/card'
;
import
styled
from
'styled-components'
import
styles
from
'./index.less'
;
const
Wrap
=
styled
(
props
=>
<
div
{
...
props
}
/>)
`
> .ant-card {
border-radius: 8px;
.ant-card-head {
border-bottom: none;
.ant-card-head-title {
line-height: 24px;
padding-bottom: 0;
font-size: 16px;
font-weight: 500;
color: rgba(23, 43, 77, 1);
}
}
.ant-card-body {
padding: 14px 24px 24px;
}
}
&.fullHeight {
height: 100%;
.ant-card {
height: 100%;
display: flex;
flex-direction: column !important;
.ant-card-head {
flex-shrink: 0;
}
.ant-card-body {
flex: 1;
}
}
}
`
export
interface
MellowCardProps
extends
CardProps
{
blockClassName
?:
string
;
fullHeight
?:
boolean
;
// 是否占满父级的高度,一般用于多列使用改组件的情况
}
const
MellowCard
:
React
.
FC
<
MellowCardProps
>
=
props
=>
{
const
{
children
,
blockClassName
,
fullHeight
,
...
rest
}
=
props
;
const
cls
=
classNames
({
'fullHeight'
:
fullHeight
,
});
return
(
<
Wrap
className=
{
cls
}
>
<
Card
bordered=
{
false
}
{
...
rest
}
>
{
children
}
</
Card
>
</
Wrap
>
)
};
/*
* @Author: XieZhiXiong
* @Date: 2020-08-26 17:32:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-
12-29 15:06:05
* @Description: 基于 antd Card 封装的适合项目 UI 的 Card,使用方式跟 antd Card 一样,这里只是修改了样式
*/
import
React
from
'react'
;
import
{
Card
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
{
CardProps
}
from
'antd/lib/card'
;
import
styled
from
'styled-components'
import
styles
from
'./index.less'
;
const
Wrap
=
styled
(
props
=>
<
div
{
...
props
}
/>)
`
> .ant-card {
border-radius: 8px;
.ant-card-head {
border-bottom: none;
.ant-card-head-title {
line-height: 24px;
padding-bottom: 0;
font-size: 16px;
font-weight: 500;
color: rgba(23, 43, 77, 1);
}
}
.ant-card-body {
padding: 14px 24px 24px;
}
}
&.fullHeight {
height: 100%;
.ant-card {
height: 100%;
display: flex;
flex-direction: column !important;
.ant-card-head {
flex-shrink: 0;
}
.ant-card-body {
flex: 1;
}
}
}
`
export
interface
MellowCardProps
extends
CardProps
{
blockClassName
?:
string
;
fullHeight
?:
boolean
;
// 是否占满父级的高度,一般用于多列使用改组件的情况
}
const
MellowCard
:
React
.
FC
<
MellowCardProps
>
=
props
=>
{
const
{
children
,
blockClassName
,
fullHeight
,
...
rest
}
=
props
;
const
cls
=
classNames
({
'fullHeight'
:
fullHeight
,
});
return
(
<
Wrap
className=
{
cls
}
>
<
Card
bordered=
{
false
}
{
...
rest
}
>
{
children
}
</
Card
>
</
Wrap
>
)
};
export
default
MellowCard
;
\ No newline at end of file
src/pages/member/components/SincerityInfo/index.tsx
View file @
ab4b92fd
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment