@farris/extend-scroll-collapsible-area v0.0.2
ScrollCollapsibleArea
This library was generated with Angular CLI version 7.2.0.
功能
在某个区域范围内,存在可収折展示区和滚动区域。当滚动区域向下拖动滚动条时,可収折区域慢慢収折。 当滚动区域向上拖动滚动条时,可収折区域慢慢展开。
模块 FEScrollCollapsibleAreaModule
1.import {FEScrollCollapsibleAreaModule} from '@farris/extend-scroll-collapsible-area';
指令 FEScrollCollapsibleAreaDirective
- 指令选择器 fe-scroll-collapsible
- 指令功能:标记区域范围,在此区域内的収折展示区和滚动区域是配对操作
指令 FEScrollAreaDirective
- 指令选择器 fe-scroll-area
- 指令功能:标记滚动区域,当滚动区域滚动时,对应的収折、展开与之对应的可収折展示区。
组件 FECollapsibleAreaComponent
- 组件选择器:fe-collapsible-area
- 组件功能:标记収折展示区,可収折、展开,与滚动区域联动
- Input属性: defaultCollapse 打开初始时,展示区域是否收起,默认是false,表示展开。
Code scaffolding
Run ng generate component component-name --project scroll-collapsible-area
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project scroll-collapsible-area
.
Note: Don't forget to add
--project scroll-collapsible-area
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build scroll-collapsible-area
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build scroll-collapsible-area
, go to the dist folder cd dist/scroll-collapsible-area
and run npm publish
.
Running unit tests
Run ng test scroll-collapsible-area
to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.