ibt2/src/IbtDialog.vue

24 lines
556 B
Vue
Raw Normal View History

2017-01-19 20:46:17 +01:00
<template>
<md-dialog-alert :md-content="dialog.text" :md-ok-text="dialog.ok" ref="ibtDialogObj" />
</template>
<script>
export default {
props: {dialog: {default: function(){return {text: 'snap! some error has occurred', ok: 'ok'}}}},
methods: {
show(opts) {
if (!opts) {
opts = {};
}
this.dialog.text = opts.text || this.dialog.text;
this.dialog.ok = opts.ok || this.dialog.ok;
this.$refs.ibtDialogObj.open();
}
}
}
2017-01-19 22:21:50 +01:00
2017-01-19 20:46:17 +01:00
</script>
<style>
</style>