@yibozhang/pro-table
v0.0.7
Published
基于 Angular 和 ng-zorro-antd 的高级表格组件库
Maintainers
Readme
ProTable
This library was generated with Angular CLI version 10.2.5.
Code scaffolding
Run ng generate component component-name --project pro-table to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project pro-table.
Note: Don't forget to add
--project pro-tableor else it will be added to the default project in yourangular.jsonfile.
Build
Run ng build pro-table to build the project. The build artifacts will be stored in the dist/ directory.
Publishing
After building your library with ng build pro-table, go to the dist folder cd dist/pro-table and run npm publish.
Running unit tests
Run ng test pro-table to execute the unit tests via Karma.
样式导入
在使用此库时,需要正确导入样式文件:
1. 在 angular.json 中配置样式(推荐)
{
"styles": [
"node_modules/ng-zorro-antd/ng-zorro-antd.less",
"node_modules/@yibozhang/pro-table/src/lib/styles/theme.less",
"node_modules/@yibozhang/pro-table/src/lib/styles/custom-antd.less",
"node_modules/@yibozhang/pro-table/src/lib/styles/margin.css"
]
}2. 或在组件样式中导入
// styles.less
@import "~ng-zorro-antd/ng-zorro-antd.less";
@import "~@yibozhang/pro-table/src/lib/styles/theme.less";
@import "~@yibozhang/pro-table/src/lib/styles/custom-antd.less";
@import "~@yibozhang/pro-table/src/lib/styles/margin.css";重要提示:
- 必须先导入
ng-zorro-antd.less,再导入库的样式文件 - 库的
theme.less只包含变量定义和样式覆盖,不包含完整的 ng-zorro-antd 样式
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
