drift-bottle.component_20241224200043.ts 838 B

1234567891011121314151617181920212223242526272829303132
  1. import { Component, OnInit } from '@angular/core';
  2. import { Router } from '@angular/router';
  3. import { IonicModule, ModalController } from '@ionic/angular';
  4. import { ThrowDriftBottleComponent } from '../throw-drift-bottle/throw-drift-bottle.component';
  5. @Component({
  6. selector: 'app-drift-bottle',
  7. templateUrl: './drift-bottle.component.html',
  8. styleUrls: ['./drift-bottle.component.scss'],
  9. standalone: true,
  10. imports: [
  11. IonicModule,
  12. // 其他导入项...
  13. ]
  14. })
  15. export class DriftBottleComponent implements OnInit {
  16. constructor(private router: Router, private modalCtrl: ModalController) {}
  17. ngOnInit() {}
  18. async throwDriftBottleModal() {
  19. const modal = await this.modalCtrl.create({
  20. component: ThrowDriftBottleComponent,
  21. cssClass: 'my-custom-class'
  22. });
  23. return await modal.present();
  24. }
  25. }