AlertComponent.vue 423 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <v-alert :type="type" class="position">
  3. <slot></slot>
  4. </v-alert>
  5. </template>
  6. <script lang="ts">
  7. import {defineComponent, ref} from "@vue/composition-api";
  8. export default defineComponent({
  9. props: {
  10. type:{
  11. type: String,
  12. required: true
  13. }
  14. }
  15. })
  16. </script>
  17. <style scoped>
  18. .position{
  19. position: fixed;
  20. width: 300px;
  21. bottom: 0;
  22. right: 0;
  23. }
  24. </style>