mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 17:30:37 +01:00
fix(plugins): error in provides
This commit is contained in:
@@ -26,7 +26,9 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
provide: {
|
provide: {
|
||||||
copy
|
clipboard: {
|
||||||
|
copy
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -25,39 +25,41 @@ export default defineNuxtPlugin(() => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
provide: {
|
provide: {
|
||||||
addNotification,
|
toast: {
|
||||||
removeNotification,
|
addNotification,
|
||||||
success ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
removeNotification,
|
||||||
addNotification({
|
success ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||||
type: 'success',
|
addNotification({
|
||||||
title,
|
type: 'success',
|
||||||
description,
|
title,
|
||||||
timeout
|
description,
|
||||||
})
|
timeout
|
||||||
},
|
})
|
||||||
info ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
},
|
||||||
addNotification({
|
info ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||||
type: 'info',
|
addNotification({
|
||||||
title,
|
type: 'info',
|
||||||
description,
|
title,
|
||||||
timeout
|
description,
|
||||||
})
|
timeout
|
||||||
},
|
})
|
||||||
warning ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
},
|
||||||
addNotification({
|
warning ({ title, description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||||
type: 'warning',
|
addNotification({
|
||||||
title,
|
type: 'warning',
|
||||||
description,
|
title,
|
||||||
timeout
|
description,
|
||||||
})
|
timeout
|
||||||
},
|
})
|
||||||
error ({ title = 'An error occurred!', description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
},
|
||||||
addNotification({
|
error ({ title = 'An error occurred!', description, timeout }: { title?: string, description?: string, timeout?: number } = {}) {
|
||||||
type: 'error',
|
addNotification({
|
||||||
title,
|
type: 'error',
|
||||||
description,
|
title,
|
||||||
timeout
|
description,
|
||||||
})
|
timeout
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user