fchat-rising/components/custom_dialog.ts

21 lines
380 B
TypeScript
Raw Normal View History

2019-01-03 18:38:17 +01:00
import {Component} from '@f-list/vue-ts';
2017-09-02 03:50:31 +02:00
import Vue from 'vue';
import Modal from './Modal.vue';
2019-09-17 19:14:14 +02:00
@Component({
components: {Modal}
})
2017-09-02 03:50:31 +02:00
export default class CustomDialog extends Vue {
2018-07-20 03:12:26 +02:00
protected get dialog(): Modal {
return <Modal>this.$children[0];
}
2017-09-02 03:50:31 +02:00
show(): void {
2018-07-20 03:12:26 +02:00
this.dialog.show();
2017-09-02 03:50:31 +02:00
}
hide(): void {
2018-07-20 03:12:26 +02:00
this.dialog.hide();
2017-09-02 03:50:31 +02:00
}
2020-03-21 13:35:22 -05:00
}