Skip to content

Commit

Permalink
fix: #32 add basic ol fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Apr 5, 2020
1 parent e59def1 commit 77ac644
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions projects/ledge-render/src/lib/ledge-render.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,18 @@ <h6 *ngIf="item.depth === 6" [innerHTML]="item.text" class="ledge-heading" id="{
<div *ngSwitchCase="'list'">
<ng-template #recursiveList let-list>
<li *ngFor="let item of list" class="sub-item" [innerHTML]="item.body.name">
<ul *ngIf="item.body.children.children && item.body.children.children.length > 0">
<ul *ngIf="!item.ordered && item.body.children.children && item.body.children.children.length > 0">
<ng-container
*ngTemplateOutlet="recursiveList; context:{ $implicit: item.body.children.children }"></ng-container>
</ul>
<ol *ngIf="item.ordered && item.body.children.children && item.body.children.children.length > 0">
<ng-container
*ngTemplateOutlet="recursiveList; context:{ $implicit: item.body.children.children }"></ng-container>
</ol>
</li>
</ng-template>
<ul>
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.data }"></ng-container>
</ul>
<ul *ngIf="!item.ordered"><ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.data }"></ng-container></ul>
<ol *ngIf="item.ordered"><ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.data }"></ng-container></ol>
</div>


Expand Down
4 changes: 4 additions & 0 deletions src/app/presentation/ledge-helper/ledge-helper.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export class LedgeHelperComponent implements OnInit {
content = `
# Ledge 语法帮助
1. first
2. second
3. third
\`\`\`list-style
- 开源工具采用
- 商业采购
Expand Down

0 comments on commit 77ac644

Please sign in to comment.