Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Datatables 在parceljs中导入数据表_Datatables_Parceljs - Fatal编程技术网

Datatables 在parceljs中导入数据表

Datatables 在parceljs中导入数据表,datatables,parceljs,Datatables,Parceljs,我正在尝试使用导入(连同jquery和矩) 我已使用中的解决方法导入jquery 这是我的档案: 在index.html中: <table id="tableFlows" class="display" style="width:100%"> <thead> <tr> <th>Name</th> <th>Position</

我正在尝试使用导入(连同jquery和矩)

我已使用中的解决方法导入jquery

这是我的档案:

在index.html中:

      <table id="tableFlows" class="display" style="width:100%">
        <thead>
          <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Age</th>
            <th>Start date</th>
            <th>Salary</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Tiger Nixon</td>
            <td>System Architect</td>
            <td>Edinburgh</td>
            <td>61</td>
            <td>2011/04/25</td>
            <td>$320,800</td>
          </tr>
        </tbody>
      </table>
在控制台中,我看到以下错误:

错误来自
flows.js

$('#datetimepicker1').datetimepicker();
$('#datetimepicker2').datetimepicker();

$('#buttonGo').on('click', function() {
  const moment1 = $("#datetimepicker1").datetimepicker('date');
  const moment2 = $('#datetimepicker2').datetimepicker('date');

  console.log(moment1.format('X'), moment2.format('X'));
});

$("#tableFlows").DataTable();

请帮助。

在index.js中,使用
require('datatables.net dt')()require
,而不是导入

,但它也不起作用。相关:
$('#datetimepicker1').datetimepicker();
$('#datetimepicker2').datetimepicker();

$('#buttonGo').on('click', function() {
  const moment1 = $("#datetimepicker1").datetimepicker('date');
  const moment2 = $('#datetimepicker2').datetimepicker('date');

  console.log(moment1.format('X'), moment2.format('X'));
});

$("#tableFlows").DataTable();