TypeError: this.$el.DataTable is not a function( REACT.JS)
TypeError: this.$el.DataTable is not a function( REACT.JS)
背景:
您好,我是 React 新手,目前正在构建一个包含 datatables 的应用程序。
问题:
它在本地机器 (pc) 上运行完美,但是当我在 codesandbox 中使用相同的代码时,我得到 TypeError: this.$el.DataTable is not a function。
我尝试在 index.html 文件中使用数据表和 jquery cdns,但它没有任何效果。
任何提示,建议都会有所帮助,
提前致谢。
代码:
您的代码中存在两个问题。我已经在分叉里评论了。
背景:
您好,我是 React 新手,目前正在构建一个包含 datatables 的应用程序。
问题:
它在本地机器 (pc) 上运行完美,但是当我在 codesandbox 中使用相同的代码时,我得到 TypeError: this.$el.DataTable is not a function。 我尝试在 index.html 文件中使用数据表和 jquery cdns,但它没有任何效果。 任何提示,建议都会有所帮助, 提前致谢。
代码:
您的代码中存在两个问题。我已经在分叉里评论了。