chore: improvements (#1)

* chore: improvements

* fix: use class

* chore: more improvements
This commit is contained in:
Sébastien Chopin authored and GitHub committed 2021-11-04 22:01:48 +08:00
1 parent 6a9f6db135
commit 0a351f1aa9
4 files changed
+13 -14

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
<template>
<main class="py-20 px-10 text-center">
<NuxtPage />
</main>
</template>
<style>
@import '@unocss/reset/tailwind.css';
@import '~/styles/main.css';
</style>
-5
View File
@@ -1,5 +0,0 @@
<template>
<main py-20 px-10 text-center>
<slot />
</main>
</template>
-5
View File
@@ -6,10 +6,6 @@ export default defineNuxtConfig({
'@vueuse/core/nuxt', '@vueuse/core/nuxt',
'@unocss/nuxt', '@unocss/nuxt',
], ],
css: [
'@unocss/reset/tailwind.css',
'~/styles/main.css',
],
unocss: { unocss: {
shortcuts: [ shortcuts: [
['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'], ['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
@@ -22,5 +18,4 @@ export default defineNuxtConfig({
}), }),
], ],
}, },
components: true,
}) })
+3 -4
View File
@@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
const route = useRoute() const route = useRoute()
const router = useRouter()
</script> </script>
<template> <template>
@@ -8,12 +7,12 @@ const router = useRouter()
<div>Hi: {{ route.params.id }}</div> <div>Hi: {{ route.params.id }}</div>
<div> <div>
<button <NuxtLink
class="btn m-3 text-sm mt-6" class="btn m-3 text-sm mt-6"
@click="router.back()" to="/"
> >
Back Back
</button> </NuxtLink>
</div> </div>
<Counter /> <Counter />