【问题标题】:How to update ag-grid versions?如何更新 ag-grid 版本?
【发布时间】:2020-06-03 03:57:33
【问题描述】:

我以前用过:

  • "ag-grid": "^18.1.2",
  • “ag-grid-angular”:“^18.1.1”
  • “ag-grid-enterprise”:“^18.1.1”版本。

由于许可证过期,我获得了新版本的许可证。

然后我补充说:

  • "@ag-grid-community/angular": "^22.1.1",
  • "@ag-grid-community/core": "^22.1.1",
  • "@ag-grid-enterprise/all-modules": "^22.1.1",
  • "@ag-grid-enterprise/core": "^22.1.1",
  • "@ag-grid-community/client-side-row-model": "^22.1.1",

我也加了

@import "./node_modules/@ag-grid-enterprise/all-modules/dist/styles/ag-grid.scss";
@import "./node_modules/@ag-grid-enterprise/all-modules/dist/styles/ag-theme-balham/sass/ag-theme-balham.scss";
@import "../node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css";

styles.css 文件。

但是更新版本的 ag-grid 中缺少行线。

如果你能给我一些建议,那对我会有很大的帮助。

这是 ag-grid 的另一张图片。

【问题讨论】:

  • row lines 中有哪些数据?能否提供一些代码供参考

标签: angular ag-grid ag-grid-angular


【解决方案1】:

也许这有帮助...我的 package.json 看起来和你的略有不同:

"ag-grid-angular": "^22.1.1",
"ag-grid-community": "^22.1.1",
"ag-grid-enterprise": "^22.1.1",

【讨论】:

【解决方案2】:

我认为您还需要将“ag-grid”:“^18.1.2”升级为“ag-grid-angular”:“^20.1.0”,这样做您需要遵循更改

Step1:进入package.json,将“ag-grid”:“^18.1.2”修改为“ag-grid-angular”:“20.1.0”,

第2步:将您的打字稿版本“typescript”:“~2.7.2”更改为“typescript”:“~3.2.4”

第 3 步:在您的项目中运行 npm update。

第四步:现在运行 ng serve

【讨论】:

    猜你喜欢
    • 2021-06-15
    • 2019-08-02
    • 2021-11-20
    • 2020-12-28
    • 2022-01-14
    • 2020-10-17
    • 2020-08-19
    • 1970-01-01
    • 2018-07-11
    相关资源
    最近更新 更多