|
@@ -4,6 +4,7 @@ import { CommonModule } from '@angular/common';
|
|
|
import { FormsModule } from '@angular/forms';
|
|
|
import { IonDatetime } from '@ionic/angular';
|
|
|
import { DateTimePickerModal } from '../datetime-picker-modal/datetime-picker-modal.component';
|
|
|
+import { Input } from '@angular/core';
|
|
|
|
|
|
@Component({
|
|
|
selector: 'app-task-modal',
|
|
@@ -27,6 +28,11 @@ export class TaskModalComponent {
|
|
|
|
|
|
constructor(private modalCtrl: ModalController) {}
|
|
|
|
|
|
+ // 新增事件标签属性
|
|
|
+ @Input()
|
|
|
+ public triggeredTag: string = '';
|
|
|
+
|
|
|
+
|
|
|
// 新增模态控制器实现
|
|
|
addTag() {
|
|
|
if (this.newTag) {
|
|
@@ -55,6 +61,11 @@ export class TaskModalComponent {
|
|
|
if (!this.task.title) {
|
|
|
return;
|
|
|
}
|
|
|
+ this.modalCtrl.dismiss({
|
|
|
+ confirmed: true,
|
|
|
+ task: this.task,
|
|
|
+ sourceTag: this.triggeredTag
|
|
|
+ });
|
|
|
this.modalCtrl.dismiss(this.task);
|
|
|
}
|
|
|
|