Skip to content

Commit

Permalink
feat: customize ul, ol style
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Oct 26, 2021
1 parent e15df5c commit 865ec17
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/assets/scripts/themes/default-theme-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,14 @@ link {
/* 微信链接样式 */
wx_link {
}
/* 有序列表样式 */
ol {
}
/* 无序列表样式 */
ul {
}
/* 列表项样式 */
li {
}
`;
export default DEFAULT_CSS_CONTENT;
13 changes: 12 additions & 1 deletion src/assets/scripts/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,18 @@ export function customCssWithTemplate(jsonString, color, theme) {
custom_theme.inline.wx_link,
jsonString.wx_link
);

custom_theme.block.ul = Object.assign(
custom_theme.block.ul,
jsonString.ul
);
custom_theme.block.ol = Object.assign(
custom_theme.block.ol,
jsonString.ol
);
custom_theme.inline.listitem = Object.assign(
custom_theme.inline.listitem,
jsonString.li
);
return custom_theme;
}

Expand Down

0 comments on commit 865ec17

Please sign in to comment.