fchat-rising/components/custom_dialog.ts

21 lines
406 B
TypeScript
Raw Normal View History

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