| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <div class="dialog">
- <div class="center">
- <div class="title">{{title}}</div>
- <div class="text">{{text}}</div>
- <div class="p-3 text-center">
- <button @click="closeDialog()" class="btn bt-sm btn-dark mb-1">OK</button>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { defineComponent } from 'vue';
- import {closeDialog} from 'vue3-promise-dialog'
- export default defineComponent({
- props: {
- text: String,
- title: String
- },
- setup() {
- function returnValue() {
- return true;
- }
- return {
- returnValue,
- closeDialog
- };
- },
- });
- </script>
- <style scoped>
- .dialog {
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- background-color: rgba(0, 0, 0, 0.3);
- z-index: 1000;
- }
- .center {
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- background-color: white;
- width: 30%;
- min-width: 400px;
- box-shadow: 5px 5px 5px #6f6f6f;
- }
- .title {
- background-color: #FFC300;
- padding: 0.5em;
- font-size: 1.5em;
- }
- .text {
- padding: 0.5em;
- padding-left: 1.5em;
- font-size: 1.2em;
- font-weight: 600;
- }
- .btn {
- margin: 10px;
- min-width: 100px;
- }
- </style>
|