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