You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import { defineNuxtPlugin } from '#app'
|
|
import { useToast } from '@/composables/useToast'
|
|
|
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
const { toast } = useToast()
|
|
|
|
// 提供插件服务但避免使用冲突的全局属性名称
|
|
return {
|
|
provide: {
|
|
toastMessage: toast
|
|
}
|
|
}
|
|
}) |