IbtDialog.vue 563 B

1234567891011121314151617181920212223
  1. <template>
  2. <md-dialog-alert :md-content="dialog.text" :md-ok-text="dialog.ok" ref="ibtDialogObj" />
  3. </template>
  4. <script>
  5. export default {
  6. props: {dialog: {default: function(){return {text: 'snap! some error has occurred', ok: 'ok'}}}},
  7. methods: {
  8. show(opts) {
  9. if (!opts) {
  10. opts = {};
  11. }
  12. this.dialog.text = opts.text || this.dialog.text;
  13. this.dialog.ok = opts.ok || this.dialog.ok;
  14. this.$refs.ibtDialogObj.open();
  15. }
  16. }
  17. }
  18. </script>
  19. <style scoped>
  20. </style>