Add platform class to body
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import AppLayout from '@/layouts/app/AppSidebarLayout.vue';
|
||||
// import AppLayout from '@/layouts/app/AppHeaderLayout.vue';
|
||||
import type { BreadcrumbItemType } from '@/types';
|
||||
import { computed, onMounted } from 'vue';
|
||||
|
||||
interface Props {
|
||||
breadcrumbs?: BreadcrumbItemType[];
|
||||
@@ -10,6 +11,13 @@ interface Props {
|
||||
withDefaults(defineProps<Props>(), {
|
||||
breadcrumbs: () => [],
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) {
|
||||
document.body.classList.add('is-mac')
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user