import { Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef, ChangeDetectorRef } from '@angular/core';
import { ComponentBase } from './ComponentBase';


@Component({
  selector: 'app-form',
  templateUrl: './form.component.html',
  styleUrls: ['./form.component.css']
})
export class FormComponent extends ComponentBase implements OnInit, OnChanges, OnDestroy {

  // 储存数据用
  saveKey = "NJ_BookTable";
  // 储存对象
  item: any = {
    title: '',
    questionTextAudio: '',
    audioFileName: '',
    choseLevel: 1,
    bookImg: '',
    bookAudio: '',
    bookAudioFileName: '',
  };

  

  saveAudioFileName(name, key) {
    this.item[key]=name;
    this.save();
  }
}