chore: update fixture
This commit is contained in:
19
fixtures/vitesse/src/components/Counter.vue
Normal file
19
fixtures/vitesse/src/components/Counter.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
initial: number
|
||||
}>()
|
||||
|
||||
const { count, inc, dec } = useCounter(props.initial)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
{{ count }}
|
||||
<button class="inc" @click="inc()">
|
||||
+
|
||||
</button>
|
||||
<button class="dec" @click="dec()">
|
||||
-
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
33
fixtures/vitesse/src/components/Footer.vue
Normal file
33
fixtures/vitesse/src/components/Footer.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
const { t, availableLocales, locale } = useI18n()
|
||||
|
||||
const toggleLocales = () => {
|
||||
// change to some real logic
|
||||
const locales = availableLocales
|
||||
locale.value = locales[(locales.indexOf(locale.value) + 1) % locales.length]
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<nav text-xl mt-6>
|
||||
<RouterLink class="icon-btn mx-2" to="/" :title="t('button.home')">
|
||||
<div i-carbon-campsite />
|
||||
</RouterLink>
|
||||
|
||||
<button class="icon-btn mx-2 !outline-none" :title="t('button.toggle_dark')" @click="toggleDark()">
|
||||
<div i="carbon-sun dark:carbon-moon" />
|
||||
</button>
|
||||
|
||||
<a class="icon-btn mx-2" :title="t('button.toggle_langs')" @click="toggleLocales()">
|
||||
<div i-carbon-language />
|
||||
</a>
|
||||
|
||||
<RouterLink class="icon-btn mx-2" to="/about" :title="t('button.about')">
|
||||
<div i-carbon-dicom-overlay />
|
||||
</RouterLink>
|
||||
|
||||
<a class="icon-btn mx-2" rel="noreferrer" href="https://github.com/antfu/vitesse" target="_blank" title="GitHub">
|
||||
<div i-carbon-logo-github />
|
||||
</a>
|
||||
</nav>
|
||||
</template>
|
10
fixtures/vitesse/src/components/README.md
Normal file
10
fixtures/vitesse/src/components/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## Components
|
||||
|
||||
Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components).
|
||||
|
||||
|
||||
### Icons
|
||||
|
||||
You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/).
|
||||
|
||||
It will only bundle the icons you use. Check out [`unplugin-icons`](https://github.com/antfu/unplugin-icons) for more details.
|
Reference in New Issue
Block a user