地址:https://www.npmjs.com/package/tanke
Installation
npm install tanke --save
the ways of import
import { IndependentComponentsModule } from 'tanke'; @NgModule({ imports: [ IndependentComponentsModule ,] }) export class AppModule(){}
- open
.angular-cli.json
and insert a new entry into the styles array
"styles": [ "../node_modules/tanke/assets/scss/tankestyle.scss", "styles.scss", ],
Now only support scss , I will transform to css later! If you want this , please translate your project to support scss.
- if you start a new project please code
ng new sassy-project --style=scss
- or translate project please code
ng set defaults.styleExt scss
- then open your .angular-cli.json and change
"styles": [ "styles.css" // "styles.scss" ]
components-name
1, SlidetoggleComponent
<app-table-driction [tableName]="tableName" (positionCode)="getPositionCode($event)"></app-table-driction>
@Input listName <array>
@Input @Output actionName <string>
2,TableDrictionComponent
<app-slidetoggle [(actionName)]="actionName" [listName]="listName"></app-slidetoggle>
@Input tableName <array>标签数组
@Output positionCode <number>传出点击标签位置
3,TimeSelectComponent
<app-time-select [dateNum]="27" [(actionName)]="timeActionName" (selectedValue)="getTimeValue($event)"></app-time-select>
@Input dateNum <number>标签数组
@Input @Output actionName <string>
@Output selectedValue