如何在前端使用数据网格的导出功能
How to use datagrid's export feature in the frontend
我在前端创建了一个datagrid,在使用export功能的时候,js报错,Export没有生成对应的url。我可以在前端使用导出吗?
enter image description here
router.js?version=b1068982:243 Uncaught Error: The route "oro_datagrid_export_action" does not exist.
at Router.getRoute (router.js?version=b1068982:243)
at Router.generate (router.js?version=b1068982:266)
at ExportAction.getLink (abstract-action.js?version=b1068982:311)
at ExportAction.<anonymous> (export-action.js?version=b1068982:74)
at underscore.js?version=b1068982:73
at Function._.each._.forEach (underscore.js?version=b1068982:153)
at ExportAction.<anonymous> (export-action.js?version=b1068982:69)
at triggerEvents (backbone.js?version=b1068982:369)
at triggerApi (backbone.js?version=b1068982:356)
at eventsApi (backbone.js?version=b1068982:155)
开箱即用的店面无法使用此功能。
您可以通过自定义使其工作:
- 根据您的需要,为前端创建一个单独的控制器或至少一个单独的路由。
- 更新 javascript 模块以使用 link 的新路由。这
新路由必须有 frontend: true 选项,以便在
店面。
我在前端创建了一个datagrid,在使用export功能的时候,js报错,Export没有生成对应的url。我可以在前端使用导出吗? enter image description here
router.js?version=b1068982:243 Uncaught Error: The route "oro_datagrid_export_action" does not exist.
at Router.getRoute (router.js?version=b1068982:243)
at Router.generate (router.js?version=b1068982:266)
at ExportAction.getLink (abstract-action.js?version=b1068982:311)
at ExportAction.<anonymous> (export-action.js?version=b1068982:74)
at underscore.js?version=b1068982:73
at Function._.each._.forEach (underscore.js?version=b1068982:153)
at ExportAction.<anonymous> (export-action.js?version=b1068982:69)
at triggerEvents (backbone.js?version=b1068982:369)
at triggerApi (backbone.js?version=b1068982:356)
at eventsApi (backbone.js?version=b1068982:155)
开箱即用的店面无法使用此功能。
您可以通过自定义使其工作:
- 根据您的需要,为前端创建一个单独的控制器或至少一个单独的路由。
- 更新 javascript 模块以使用 link 的新路由。这 新路由必须有 frontend: true 选项,以便在 店面。