Ember项目中的数据表

时间:2018-12-22 20:25:16

标签: ember.js datatables

我对Ember和DataTables并不完全陌生,并且在早期项目中一起使用了它们。但是,在我的新项目中,我面临一个问题。每当我尝试包括DataTables javascript(jquery.dataTables.js')文件时,在浏览器控制台上都会出现以下错误:

jquery.js:286 Uncaught TypeError: Cannot set property [] of [object Array] which has only a getter
    at Function.jQuery.extend.jQuery.fn.extend (jquery.js:286)
    at jquery.dataTables.js:14633
    at jquery.dataTables.js:56
    at jquery.dataTables.js:59
jQuery.extend.jQuery.fn.extend @ jquery.js:286
(anonymous) @ jquery.dataTables.js:14633
(anonymous) @ jquery.dataTables.js:56
(anonymous) @ jquery.dataTables.js:59
loader.js:247 Uncaught Error: Could not find module `ember-resolver` imported from `peptalk-web/resolver`
    at missingModule (loader.js:247)
    at findModule (loader.js:258)
    at Module.findDeps (loader.js:168)
    at findModule (loader.js:262)
    at Module.findDeps (loader.js:168)
    at findModule (loader.js:262)
    at requireModule (loader.js:24)
    at app-boot.js:3
missingModule @ loader.js:247
findModule @ loader.js:258
Module.findDeps @ loader.js:168
findModule @ loader.js:262
Module.findDeps @ loader.js:168
findModule @ loader.js:262
requireModule @ loader.js:24
(anonymous) @ app-boot.js:3

我的ember-cli-build.js文件如下所示:

  app.import('vendor/bootstrap/dist/css/bootstrap.min.css');
  app.import('vendor/font-awesome/css/font-awesome.min.css');
  app.import('vendor/Ionicons/css/ionicons.min.css');
  app.import('vendor/datatables.net-bs/css/dataTables.bootstrap.css');
  app.import('vendor/adminlte/dist/css/AdminLTE.min.css');
  app.import('vendor/adminlte/dist/css/skins/skin-blue.min.css');

  app.import('vendor/bootstrap/dist/js/bootstrap.min.js');
  app.import('vendor/datatables.net/js/jquery.dataTables.js');
//  app.import('vendor/datatables.net-bs/js/dataTables.bootstrap.js');
  app.import('vendor/adminlte/dist/js/adminlte.js');

  return app.toTree();

0 个答案:

没有答案