sidebarItem belum fix

This commit is contained in:
2025-05-28 07:23:47 +07:00
parent 692ffdf2f1
commit 453fccf550
14 changed files with 990 additions and 48 deletions
+24
View File
@@ -0,0 +1,24 @@
function encodeBase64(value: string): string {
if (process.client) {
return window.btoa(unescape(encodeURIComponent(value)))
} else {
return Buffer.from(value, 'ascii').toString('base64')
}
}
function decodeBase64(value: string): string {
if (process.client) {
return decodeURIComponent(escape(window.atob(value)))
} else {
return Buffer.from(value, 'base64').toString('ascii')
}
}
export default defineNuxtPlugin(() => {
return {
provide: {
encodeBase64,
decodeBase64
}
}
})