mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
4f104523ff
- refactor phrases to avoid timing problem with loading phrases of alert
24 lines
627 B
JavaScript
24 lines
627 B
JavaScript
import BsAlert from './Alert.js';
|
|
|
|
export default {
|
|
name: 'BootstrapConfirm',
|
|
mixins: [
|
|
BsAlert
|
|
],
|
|
data: () => ({
|
|
result: false
|
|
}),
|
|
popup(msg, options) {
|
|
return BsAlert.popup.bind(this)(msg, options);
|
|
},
|
|
template: `<bs-modal ref="modalContainer" class="bootstrap-confirm" v-bind="$props">
|
|
<template v-slot:default>
|
|
<slot></slot>
|
|
</template>
|
|
<template v-slot:footer>
|
|
<button type="button" class="btn btn-primary" @click="result=true;this.hide()">OK</button>
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{this.$p.t('ui', 'cancel')}}</button>
|
|
</template>
|
|
</bs-modal>`
|
|
}
|