1.0.0 • Published 7 years ago

tp-window v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

ThingsPro Window Code Coverage Build

Demo page

Features

Usages

<tp-window [name]="name" maxStateNumber="3" [loading]="loadingObservable" [optionPortal]="portal" (stateChange)="onStateChange($event)">
  <tp-window-state [name]="state.name" [icon]="state.icon" [type]="Button">
    <!-- Your DOM template -->   
  <tp-window-state>
  <tp-window-state [name]="state.name" [icon]="state.icon" [type]="Button">
    <!-- Your DOM template -->   
  <tp-window-state>
</tp-window>

API Document

tp-window (WindowComponent)

PropertyTypeDescription
name@input stringThe name will be showed on the title of component.
maxStateNumber@input numberLimit the total number of icons on the tool bar. The rest of icons will be sorted to menu list as the number of icons exceeds it. This setting could be used to RWD.
loading@input Observable<any>It Will show a loading bar before observable completed.
optionPortal@input Portal<any>Add customized actions or information by using CdkPortal
stateChange@output EventEmitter<WindowStateComponent>emit clicked state component.

tp-window-state (WindowStateComponent)

PropertyTypeDescription
name@input stringThe name will be showed on the menu item or tooltip.
icon@input stringThe name of Angular Material Icon ,please see Icons
type@input stringButton(A state contains a icon without a content page.) Content(A state contains a content page without a icon.)State(A state contains a icon with a content page.)