<script setup>
import {ref} from "vue";

defineProps([
  "title"
])

const display = ref(true)

function openOrClose() {
  display.value = !display.value
}
</script>

<template>
  <q-dialog v-model="display">
    <q-card>
      <q-card-section>
        <div class="text-h6">{{title}}</div>
      </q-card-section>

      <q-card-section class="q-pt-none">
        <slot name="body"></slot>
      </q-card-section>

      <q-card-actions align="right">
        <slot name="actions"></slot>
        <q-btn flat @click="openOrClose" v-close-popup>好的</q-btn>
      </q-card-actions>
    </q-card>
  </q-dialog>
</template>

<style scoped lang="sass">

</style>
