惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
A
About on SuperTechFans
Vercel News
Vercel News
B
Blog
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
D
Docker
V
Visual Studio Blog
博客园 - 叶小钗
The Cloudflare Blog
Jina AI
Jina AI
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏

mafeifan 的编程技术分享

mafengwo-mp3-downloader | mafeifan 的编程技术分享 示例页面 | mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 查看 default namespace 下的 default service account名称 mafeifan 的编程技术分享 检查日志 | mafeifan 的编程技术分享 bridge fdb show dev flannel.1 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享
mafeifan 的编程技术分享
2026-01-16 · via mafeifan 的编程技术分享
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-muldatepicker',
  templateUrl: './muldatepicker.component.html',
  styleUrls: ['./muldatepicker.component.styl']
})
export class MuldatepickerComponent implements OnInit {
  result = {
    budgets: []
  };

  constructor() {
  }

  ngOnInit() {
    this.result = {
      'budgets': [{
        id: 1,
        edits: [
          {
            'id': 10,
            'date': new Date('2019-01-01 00:00:00'),
            amount: 100,
          },
          {
            'id': 11,
            'date': new Date('2019-01-18 00:00:00'),
            amount: 150,
          }
        ]
        },
        {
          id: 2,
          edits: [
            {
              'id': 21,
              'date': new Date('2019-02-10 00:00:00'),
              amount: 0,
            }
          ]
        }
      ]
    }
  }

  onAddOrUpdate() {
    console.log(arguments);
  }

}
<pre>{{result.budgets|json}}</pre>
<mat-list *ngFor="let budget of result.budgets;index as i;">
  <div *ngFor="let editItem of budget.edits; index as j;index as k;">
    <mat-form-field>
      <input matInput [matDatepicker]="j" [(ngModel)]="editItem.date" placeholder="Choose a date">
      <mat-datepicker-toggle matSuffix [for]="j"></mat-datepicker-toggle>
      <mat-datepicker #j></mat-datepicker>
    </mat-form-field>
    <mat-form-field>
      <input type="number" min="0" matInput placeholder="amount" [(ngModel)]="editItem.amount">
    </mat-form-field>
    <button mat-icon-button color="primary" (click)="onAddOrUpdate(budget.id, editItem, i, k)">
      <mat-icon>edit</mat-icon>
    </button>
  </div>
</mat-list>