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

update #103

Open
wants to merge 2 commits 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
6 changes: 6 additions & 0 deletions src/components/Resume/Template3/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ export const Template3: React.FC<Props> = props => {
</b>
<span>{project.project_desc}</span>
</div>
<div className="section-detail">
<b>
<FormattedMessage id="技术架构" />:
</b>
<span>{project.project_tech}</span>
</div>
<div className="section-detail">
<b>
<FormattedMessage id="主要工作" />:
Expand Down
4 changes: 2 additions & 2 deletions src/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const Page: React.FC = () => {
}
message.success(intl.formatMessage({ id: '上传配置已应用' }));
} catch (err) {
message.error(intl.formatMessage({ id: '上传文件有误,请重新上传' }));
//message.error(intl.formatMessage({ id: '上传文件有误,请重新上传' }));
}
};
reader.readAsText(file);
Expand Down Expand Up @@ -274,7 +274,7 @@ export const Page: React.FC = () => {
<Resume
value={config}
theme={theme}
template={query.template || 'template1'}
template={query.template || 'template3'}
/>
)}
{mode === 'edit' && (
Expand Down
2 changes: 2 additions & 0 deletions src/components/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export type ResumeConfig = {
project_role: string;
/** 描述 */
project_desc?: string;
/** 技术架构 */
project_tech?: string;
/** 项目内容,负责内容 */
project_content?: string;
/** 项目时间 */
Expand Down
6 changes: 6 additions & 0 deletions src/helpers/contant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ export const CONTENT_OF_MODULE = ({ intl }) => {
displayName: intl.formatMessage({ id: '项目描述' }),
cfg: { autoSize: { minRows: 8 }, showCount: true },
},
{
type: 'textArea',
attributeId: 'project_tech',
displayName: intl.formatMessage({ id: '技术架构' }),
cfg: { autoSize: { minRows: 8 }, showCount: true },
},
{
type: 'textArea',
attributeId: 'project_content',
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/store-to-local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function getConfig(
}

return fetchResume(lang, branch, user).catch(() => {
message.warn(intl.formatMessage({ id: '从模板中获取' }), 1);
//message.warn(intl.formatMessage({ id: '从模板中获取' }), 1);
return _.omit(
customAssign({}, RESUME_INFO, _.get(RESUME_INFO, ['locales', lang])),
['locales']
Expand Down
18 changes: 6 additions & 12 deletions src/hooks/useModeSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const useModeSwitcher = ({
const query = getSearchObj();

const changeMode = value => {
debugger;
if (value === mode) return;
const {
pathname,
Expand All @@ -44,18 +45,11 @@ export const useModeSwitcher = ({
<FormattedMessage id="编辑" />
</span>
)}
{mode === 'edit' &&
(canPreview ? (
<Popover content={<FormattedMessage id="无用户信息,不允许预览" />}>
<span>
<FormattedMessage id="预览" />
</span>
</Popover>
) : (
<span className={cx('mode-item')} onClick={() => changeMode('read')}>
<FormattedMessage id="预览" />
</span>
))}
{mode === 'edit' && (
<span className={cx('mode-item')} onClick={() => changeMode('read')}>
<FormattedMessage id="预览" />
</span>
)}
</div>,
mode,
changeMode,
Expand Down