小编Das*_*sun的帖子

如何修复 node_modules/chart.js/types/animation.d.ts(20,37) 中的错误:错误 TS1005:预期为“,”。在 Chart.js 中

我正在开发一个 Angular 6 项目,我想使用 Chart.js 创建一些图表。

我使用 npm install Chart.js 安装了 Chart.js,其版本类似于 3.5.1。

我的 TypeScript 版本是 2.9.0。

所以当我尝试ng serve

node_modules/chart.js/types/animation.d.ts(20,37): error TS1005: ',' expected.
node_modules/chart.js/types/animation.d.ts(20,46): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(39,56): error TS1005: ';' expected.
node_modules/chart.js/types/index.esm.d.ts(39,58): error TS1011: An element access expression should take an argument.
node_modules/chart.js/types/index.esm.d.ts(39,85): error TS1005: '(' expected.
node_modules/chart.js/types/index.esm.d.ts(535,38): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(535,56): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(2424,37): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(2424,50): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(2734,63): error TS1005: ';' expected.
node_modules/chart.js/types/index.esm.d.ts(2734,69): error TS1011: …
Run Code Online (Sandbox Code Playgroud)

chart.js angular angular6

4
推荐指数
1
解决办法
2363
查看次数

Laravel 如何获取当前时间和日期值

我正在开发一个考勤管理系统。因此我的主管要求我开发以下视图来获取考勤时间和日期值。

在此输入图像描述 我需要的要求很少。

  1. 所有记录都需要根据受训者 ID 保存在数据库中。根据该视图,如果具有上述 ID 的人选中该框,然后按标记按钮,则时间值和受训者 ID 必须按时间保存在数据库中。

  2. 那么如果一旦标记了Date值也需要保存在数据库中。

  3. 然后再次检查并按下标记按钮,它必须作为关闭时间。只需要允许 2 条记录,否则它们可能有很多开启关闭值。

谁能建议我相关的控制器功能?

这是上面的相关视图

<table class="table table-striped">
      <thead>

       <th>Trainee ID</th>
        <th>Name with Initials</th> 
        <th>Time</th>
        <th>Mark Here!</th>
      </thead>

      <tbody>
        @foreach($items as $item)

    <tr>

     <td>{{ $item->trainee_id }}</td>
      <td>{{ $item->name_with_initials }}</td>


        <td>
        <label><input type="checkbox" value="">&nbsp; Time</label>
      </td>

        <td>
        <a class="btn btn-info" href="Bankdetails/{{ $item->trainee_id }}">Mark Here</a>
      </td>
  </tr>
        @endforeach

      </tbody>

</table>
Run Code Online (Sandbox Code Playgroud)

php database forms laravel laravel-5

3
推荐指数
1
解决办法
3万
查看次数

Laravel Time 值根据实时出现错误

我开发了获取当前日期和时间值的函数。它工作正常。但时间值错误。现在时间是我的时间下午 12.32,但它在数据库中保存为上午 6.40。

这是使用的控制器功能。

 public function store(Request $request)
{
  $request['time']=date("Y-m-d h:i:s a", time());
    attendance::create($request->all());
            return view('traineeattendance.attendanceo');
}
Run Code Online (Sandbox Code Playgroud)

斯里兰卡标准时间 (SLST) 是斯里兰卡的时区。比 GMT/UTC (UTC+05:30) 早 5 小时 30 分钟,因此时区 = GMT+5.5。

谁能帮我解决这个问题?

php time timezone laravel laravel-5

2
推荐指数
1
解决办法
1561
查看次数

标签 统计

laravel ×2

laravel-5 ×2

php ×2

angular ×1

angular6 ×1

chart.js ×1

database ×1

forms ×1

time ×1

timezone ×1