<template>
  <v-app :full-height="false">
    <v-snackbar
      timeout="-1"
      location="top"
      :variant="variant || 'flat'"
      :color="color"
      v-model="snackbar"
    >{{message}}
    <template v-slot:actions>
          <v-btn
            color="white"
            variant="text"
            @click="snackbar = false"
          >
            关闭
          </v-btn>
        </template>
    </v-snackbar>
  </v-app>
</template>

<script setup>
import { ref } from 'vue'
defineProps({
  variant: String,
  color: String,
  message: String
})
defineOptions({ name: 'snackbar-message' })

const snackbar = ref(true)

</script>
<style scoped>

</style>