mirror of
https://github.com/rustfs/console.git
synced 2026-09-19 01:47:44 +08:00
22 lines
677 B
Vue
22 lines
677 B
Vue
<template>
|
|
<slot />
|
|
<AppDialogHost />
|
|
<ClientOnly>
|
|
<Toaster position="top-center" :rich-colors="true" :close-button="true" />
|
|
</ClientOnly>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import AppDialogHost from '@/components/providers/AppDialogHost.vue'
|
|
import { Toaster } from '@/components/ui/sonner'
|
|
import { createDialogController, dialogControllerKey } from '@/lib/ui/dialog'
|
|
import { createMessageApi, messageInjectionKey } from '@/lib/ui/message'
|
|
import { provide } from 'vue'
|
|
|
|
const dialogController = createDialogController()
|
|
const messageApi = createMessageApi()
|
|
|
|
provide(dialogControllerKey, dialogController)
|
|
provide(messageInjectionKey, messageApi)
|
|
</script>
|