/
githubmirror
/
vuetify
Обзор
Документация
Войти
/
githubmirror
/
vuetify
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/docs/src/examples/application/theme.vue
32 строки
708 B
J-Sek
docs: compensate for margin reset dropped from headings
27 янв 2026, 14:23
27 янв 2026, 14:23
1c2fb89
Код
Авторство
О чём код?
<template> <v-responsive class="border rounded" max-height="300"> <v-app :theme="theme"> <v-app-bar class="px-3"> <v-spacer></v-spacer> <v-btn :prepend-icon="theme === 'light' ? 'mdi-weather-sunny' : 'mdi-weather-night'" text="Toggle Theme" slim @click="onClick" ></v-btn> </v-app-bar> <v-main> <v-container> <h1 class="my-0">Main Content</h1> </v-container> </v-main> </v-app> </v-responsive> </template> <script setup> import { ref } from 'vue' const theme = ref('light') function onClick () { theme.value = theme.value === 'light' ? 'dark' : 'light' } </script>