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

feat(module:collapse): support custom header #383

Merged
merged 1 commit into from
Sep 30, 2017

Conversation

SangKa
Copy link
Contributor

@SangKa SangKa commented Sep 26, 2017

Close #382

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #382

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Usage:

import {Component, OnInit} from '@angular/core';

@Component({
  selector: 'nz-demo-collapse-basic',
  template: `
    <nz-collapseset>
      <nz-collapse *ngFor="let panel of panels" [nzActive]="panel.active"
                   [nzDisabled]="panel.disabled">
        <p collapse-title>{{panel.name}}</p>
        <p>{{panel.name}}内容</p>
        <div>papapap</div>
      </nz-collapse>
    </nz-collapseset>
  `,
  styles: []
})
export class NzDemoCollapseBasicComponent implements OnInit {
  panels = [
    {
      active: true,
      name: 'This is panel header 1',
      disabled: false,
      childPanel: [
        {
          active: false,
          name: 'This is panel header 1-1'
        }
      ]
    },
    {
      active: false,
      disabled: true,
      name: 'This is panel header 2'
    },
    {
      active: true,
      disabled: false,
      name: 'This is panel header 3'
    }
  ];

  constructor() {
  }

  ngOnInit() {
  }
}

@coveralls
Copy link

Coverage Status

Coverage remained the same at 40.752% when pulling 7d5efde on SangKa:close-382 into cf83c96 on NG-ZORRO:master.

@vthinkxie vthinkxie merged commit ca42f00 into NG-ZORRO:master Sep 30, 2017
@SangKa SangKa deleted the close-382 branch February 10, 2018 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customize the Collapse header
3 participants