1234567891011121314151617181920212223242526272829303132333435363738 |
- import { Component, OnInit, Input } from '@angular/core';
- import { ModalController, IonHeader, IonContent, IonInput, IonToolbar, IonItem, IonButtons, IonButton, IonTitle } from '@ionic/angular/standalone';
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
- export interface AgentUserInputField {
- name: string, // 字段名称
- type: string, // 输入类型
- desc: string, // 字段说明
- }
- @Component({
- selector: 'agent-user-input',
- templateUrl: './agent-user-input.component.html',
- styleUrls: ['./agent-user-input.component.scss'],
- standalone: true,
- imports: [
- IonHeader, IonContent, IonInput, IonToolbar, IonItem, IonButtons, IonButton,
- IonTitle,
- FormsModule, ReactiveFormsModule,
- ]
- })
- export class AgentUserInputComponent implements OnInit {
- @Input()
- fieldsArray: AgentUserInputField[] = []
- @Input()
- inputData: any = {}
- constructor(private modalCtrl: ModalController) { }
- ngOnInit() {
- }
- cancel() {
- return this.modalCtrl.dismiss(null, 'cancel');
- }
- confirm() {
- return this.modalCtrl.dismiss(this.inputData, 'confirm');
- }
- }
|