Files
vite-vue3-ts-template/src/pages/index.vue
Kirok Kim 7bc3379768 - update dependencies
- add example env and mode test (staging)
- add shims-vue.d.ts (define ts file in vue files)
2021-12-28 18:28:03 +09:00

55 lines
1.1 KiB
Vue

<script setup lang="ts">
const name = ref('')
const router = useRouter()
const go = () => {
if (name.value)
router.push(`/hi/${encodeURIComponent(name.value)}`)
}
const testEnv = import.meta.env.VITE_TEST
const initNum = 1
</script>
<template>
<div>
<div i-carbon-campsite text-4xl inline-block />
<p>
<a rel="noreferrer" href="https://github.com/antfu/vitesse-lite" target="_blank">
Vitesse Lite
</a>
</p>
<p>
<em text-sm op75>Opinionated Vite Starter Template</em>
</p>
<div py-4 />
<Counter :initial="initNum" />
<div py-4 />
<input
id="input"
v-model="name"
:placeholder="testEnv"
type="text"
autocomplete="false"
p="x-4 y-2"
w="250px"
text="center"
bg="transparent"
border="~ rounded gray-200 dark:gray-700"
outline="none active:none"
@keydown.enter="go"
>
<div>
<button
class="m-3 text-sm btn"
:disabled="!name"
@click="go"
>
Go
</button>
</div>
</div>
</template>