DashboardGroup
サイドバー状態管理と永続性を備えたダッシュボードコンポーネントのコンテキストを提供する固定レイアウトコンポーネント。
使用法
DashboardGroupコンポーネントは、DashboardSidebarおよびDashboardPanelコンポーネントをラップして応答性の高いダッシュボードインターフェイスを作成するメインレイアウトです。
レイアウトまたはapp.vueで使用してください:
layouts/dashboard.vue
<template>
<UDashboardGroup>
<UDashboardSidebar />
<slot />
</UDashboardGroup>
</template>
API
Props
| Prop | Default | Type |
|---|---|---|
as | 'div' | anyThe element or component this component should render as. |
storage | 'cookie' | "cookie" | "local"The storage to use for the size. |
storageKey | 'dashboard' | stringUnique id used to auto-save size. |
storageOptions | Record<string, any>Options to pass to the underlying storage ( | |
persistent | true | boolean Whether to persist the size in the storage. |
unit | '%' | "%" | "rem" | "px"The unit to use for size values. |
ui | { base?: any; } |
スロット
| Slot | Type |
|---|---|
default | {} |
Theme
app.config.ts
export default defineAppConfig({
ui: {
dashboardGroup: {
base: 'fixed inset-0 flex overflow-hidden'
}
}
})vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nuxt/ui/vite'
export default defineConfig({
plugins: [
vue(),
ui({
ui: {
dashboardGroup: {
base: 'fixed inset-0 flex overflow-hidden'
}
}
})
]
})Changelog
No recent changes