Skip to content

Commit

Permalink
feat: add component2
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Nov 21, 2023
1 parent 5c5c328 commit b464d63
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 0 deletions.
23 changes: 23 additions & 0 deletions antd-sample/MyComponent2/MyComponent.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';

import styles from './MyComponent.module.less';

export const MyComponent = () => {
return (
<div className={styles.wrapper}>
<span className={styles.span}>个人知识创作</span>
<div className={styles.div} />
<div className={styles.divDep3_1}>478W</div>
<div className={styles.divDep3_2}>总字数</div>
<div className={styles.divDep3_3} />
<div className={styles.divDep3_4}>3,779</div>
<div className={styles.divDep3_5}>文档</div>
<div className={styles.divDep3_6} />
<div className={styles.divDep3_7}>172</div>
<div className={styles.divDep3_8}>知识库</div>
<div className={styles.divDep3_9} />
<div className={styles.divDep3_10}>1,607</div>
<div className={styles.divDep3_11}>小记</div>
</div>
);
};
132 changes: 132 additions & 0 deletions antd-sample/MyComponent2/MyComponent.module.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
.wrapper {
position: relative;
width: 600px;
height: 317px;

.span {
font-size: 14px;
font-weight: bold;
position: absolute;
left: 22px;
top: 18px;
min-width: 556px;
min-height: 33px;
max-width: 566px;
}

.div {
background-color: #fafafa;
border-radius: 4px;
position: absolute;
left: 22px;
top: 76px;
min-width: 137px;
min-height: 95px;
}

.divDep3_1 {
font-weight: bold;
position: absolute;
left: 33px;
top: 97px;
min-width: 78px;
min-height: 35px;
}

.divDep3_2 {
color: #8b8f8d;
font-size: 11px;
position: absolute;
left: 33px;
top: 137px;
min-width: 78px;
min-height: 26px;
}

.divDep3_3 {
background-color: #fafafa;
border-radius: 4px;
position: absolute;
left: 168px;
top: 76px;
min-width: 137px;
min-height: 95px;
}

.divDep3_4 {
font-weight: bold;
position: absolute;
left: 197px;
top: 97px;
min-width: 78px;
min-height: 35px;
}

.divDep3_5 {
color: #8b8f8d;
font-size: 11px;
position: absolute;
left: 197px;
top: 137px;
min-width: 78px;
min-height: 26px;
}

.divDep3_6 {
background-color: #fafafa;
border-radius: 4px;
position: absolute;
left: 338px;
top: 76px;
min-width: 137px;
min-height: 95px;
}

.divDep3_7 {
font-weight: bold;
position: absolute;
left: 399px;
top: 97px;
min-width: 51px;
min-height: 35px;
}

.divDep3_8 {
color: #8b8f8d;
font-size: 11px;
position: absolute;
left: 399px;
top: 137px;
min-width: 51px;
min-height: 26px;
}

.divDep3_9 {
background-color: #fafafa;
border-radius: 4px;
position: absolute;
left: 22px;
top: 183px;
min-width: 137px;
min-height: 95px;
}

.divDep3_10 {
font-weight: bold;
position: absolute;
left: 33px;
top: 204px;
min-width: 78px;
min-height: 35px;
}

.divDep3_11 {
color: #8b8f8d;
font-size: 11px;
position: absolute;
left: 33px;
top: 245px;
min-width: 78px;
min-height: 26px;
}
}
5 changes: 5 additions & 0 deletions antd-sample/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import fetch from './common/fetch';
import Login from './login.jsx';

import { MyComponent } from './MyComponent';
import { MyComponent as MyComponent2 } from './MyComponent2/MyComponent';
import styles from './app.module.less';

import {
Expand Down Expand Up @@ -101,6 +102,10 @@ class App extends React.Component {
<h3>MyComponent</h3>
<MyComponent />
</div>
<div className={styles.myComponent}>
<h3>MyComponent2</h3>
<MyComponent2 />
</div>
<Content style={{ padding: 30 }}>
<Select
className="test-list"
Expand Down

0 comments on commit b464d63

Please sign in to comment.