@yibozhang/pro-table 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,6 +19,37 @@ After building your library with `ng build pro-table`, go to the dist folder `cd
19
19
 
20
20
  Run `ng test pro-table` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
21
 
22
+ ## 样式导入
23
+
24
+ 在使用此库时,需要正确导入样式文件:
25
+
26
+ ### 1. 在 `angular.json` 中配置样式(推荐)
27
+
28
+ ```json
29
+ {
30
+ "styles": [
31
+ "node_modules/ng-zorro-antd/ng-zorro-antd.less",
32
+ "node_modules/@yibozhang/pro-table/src/lib/styles/theme.less",
33
+ "node_modules/@yibozhang/pro-table/src/lib/styles/custom-antd.less",
34
+ "node_modules/@yibozhang/pro-table/src/lib/styles/margin.css"
35
+ ]
36
+ }
37
+ ```
38
+
39
+ ### 2. 或在组件样式中导入
40
+
41
+ ```less
42
+ // styles.less
43
+ @import "~ng-zorro-antd/ng-zorro-antd.less";
44
+ @import "~@yibozhang/pro-table/src/lib/styles/theme.less";
45
+ @import "~@yibozhang/pro-table/src/lib/styles/custom-antd.less";
46
+ @import "~@yibozhang/pro-table/src/lib/styles/margin.css";
47
+ ```
48
+
49
+ **重要提示**:
50
+ - 必须先导入 `ng-zorro-antd.less`,再导入库的样式文件
51
+ - 库的 `theme.less` 只包含变量定义和样式覆盖,不包含完整的 ng-zorro-antd 样式
52
+
22
53
  ## Further help
23
54
 
24
55
  To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yibozhang/pro-table",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "基于 Angular 和 ng-zorro-antd 的高级表格组件库",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,4 +1,7 @@
1
- @import "../node_modules/ng-zorro-antd/ng-zorro-antd.less";
1
+ // 注意:此文件只包含变量定义和样式覆盖
2
+ // 使用者项目需要先导入 ng-zorro-antd 的样式,然后再导入此文件
3
+ // 例如:@import "~ng-zorro-antd/ng-zorro-antd.less"; @import "~@yibozhang/pro-table/src/lib/styles/theme.less";
4
+
2
5
  @primary-color: #096dd9;
3
6
  @primary-5: @primary-color;
4
7
  @font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica Neue, Helvetica,