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

fix: HeaderSelectMenu支持以i18n方式自定义标题下拉菜单中H1-H5渲染内容 #4819

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
5 changes: 5 additions & 0 deletions packages/basic-modules/src/locale/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ export default {
header: {
title: '标题',
text: '正文',
header1: 'H1',
header2: 'H2',
header3: 'H3',
header4: 'H4',
header5: 'H5',
},
image: {
netImage: '网络图片',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ class HeaderSelectMenu implements ISelectMenu {
// value 和 elemNode.type 对应
{
value: 'header1',
text: 'H1',
text: t('header.header1'),
styleForRenderMenuList: { 'font-size': '32px', 'font-weight': 'bold' },
},
{
value: 'header2',
text: 'H2',
text: t('header.header2'),
styleForRenderMenuList: { 'font-size': '24px', 'font-weight': 'bold' },
},
{
value: 'header3',
text: 'H3',
text: t('header.header3'),
styleForRenderMenuList: { 'font-size': '18px', 'font-weight': 'bold' },
},
{
value: 'header4',
text: 'H4',
text: t('header.header4'),
styleForRenderMenuList: { 'font-size': '16px', 'font-weight': 'bold' },
},
{
value: 'header5',
text: 'H5',
text: t('header.header5'),
styleForRenderMenuList: { 'font-size': '13px', 'font-weight': 'bold' },
},
{ value: 'paragraph', text: t('header.text') },
Expand Down