chore: init

This commit is contained in:
Anthony Fu committed 2020-08-10 02:43:04 +08:00
commit 76fb0845ec
24 files changed
+4433

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
<template>
<div>
<p class="text-4xl">
<Icon class="iconify inline-block" icon="carbon:pedestrian" />
</p>
<p>
Hi, {{ name }}!
</p>
<div>
<button
class="btn m-3 text-sm mt-8"
@click="back"
>
Back
</button>
</div>
</div>
</template>
<script setup='props' lang='ts'>
import { useRouter } from 'vue-router'
declare const props: {
name: string
}
const router = useRouter()
export const back = () => router.push('/')
</script>
+43
View File
@@ -0,0 +1,43 @@
<template>
<div>
<p class="text-4xl">
<Icon class="iconify inline-block" icon="carbon:campsite" />
</p>
<p>
Vitesse
</p>
<div class="py-4" />
<input
v-model="name"
placeholder="What's your name?"
class="px-4 py-2 border border-gray-200 rounded text-center outline-none active:outline-none bg-transparent dark:border-gray-700"
@keydown.enter="go"
>
<div>
<button
class="btn m-3 text-sm"
:disabled="!name"
@click="go"
>
GO
</button>
</div>
</div>
</template>
<script setup='props' lang='ts'>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
export const name = ref('')
const router = useRouter()
export const go = () => {
if (name.value)
router.push(`/hi/${name.value}`)
}
</script>