Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复打印样式横线和背景色丢失的问题;修复个人能力项无法提交的问题,values.work_time已经是数组,无需再split;模板2打印… #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/FormCreator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export const FormCreator: React.FC<Props> = props => {
if ('edu_time' in values && typeof values.edu_time === 'string') {
values.edu_time = values.edu_time.split(',');
}
if ('work_time' in values) {
/*if ('work_time' in values) {
values.work_time = values.work_time.split(',');
}
}*/
props.onChange(values);
};
const formProps = {
Expand Down
10 changes: 10 additions & 0 deletions src/components/Resume/Template2/index.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.title-hr-addon {
position: relative;
flex: 1 1;
border: none;
border-top: 1px solid rgb(47, 87, 133);
}

// 响应式布局
// 内容
.template2-resume {
Expand All @@ -23,6 +30,7 @@

// 内容
.template2-resume {
font-size: 18px;
// 加点阴影
box-shadow: 0px 2px 4px 1px rgba(0, 0, 0, 0.15);

Expand Down Expand Up @@ -84,6 +92,8 @@
display: flex;
justify-content: space-between;
align-items: center;

-webkit-print-color-adjust:exact;
}
}

Expand Down
45 changes: 24 additions & 21 deletions src/components/Resume/Template2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ const Wrapper = ({ className, title, color, children }) => {
return (
<div className={cx('section', className)}>
<div className="section-title" style={{ color }}>
<span className="title">{title}</span>
<span className="title-addon" />
<span className="title">{title}&nbsp;&nbsp;</span>
{/*<span className="title-addon" />*/}
<hr className="title-hr-addon" />
</div>
<div className="section-body">{children}</div>
</div>
Expand Down Expand Up @@ -92,6 +93,24 @@ export const Template2: React.FC<Props> = props => {
{profile.email}
</div>
)}
{profile?.positionTitle && (
<div className="expect-job">
<HeartFilled style={{ color: theme.color, opacity: 0.85 }} />
<span>
<FormattedMessage id="职位" />: {profile.positionTitle}
</span>
</div>
)}
{profile?.workPlace && (
<div className="work-place">
<EnvironmentFilled
style={{ color: theme.color, opacity: 0.85 }}
/>
<span>
<FormattedMessage id="期望工作地" />: {profile.workPlace}
</span>
</div>
)}
{profile?.github && (
<div className="github">
<GithubFilled style={{ color: theme.color, opacity: 0.85 }} />
Expand Down Expand Up @@ -130,24 +149,8 @@ export const Template2: React.FC<Props> = props => {
</span>
</div>
)}
{profile?.workPlace && (
<div className="work-place">
<EnvironmentFilled
style={{ color: theme.color, opacity: 0.85 }}
/>
<span>
<FormattedMessage id="期望工作地" />: {profile.workPlace}
</span>
</div>
)}
{profile?.positionTitle && (
<div className="expect-job">
<HeartFilled style={{ color: theme.color, opacity: 0.85 }} />
<span>
<FormattedMessage id="职位" />: {profile.positionTitle}
</span>
</div>
)}


</div>
</div>
{/* 头像 */}
Expand Down Expand Up @@ -241,7 +244,7 @@ export const Template2: React.FC<Props> = props => {
color={theme.color}
>
{skillList.map((skill, idx) => {
const skills = _.split(skill.skill_desc, '\n').join(';');
const skills = _.split(skill.skill_name, '\n').join(';');
return skills ? (
<div className="skill-item" key={idx.toString()}>
<span>
Expand Down