forked from antfu-collective/vitesse-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.vue
52 lines (45 loc) · 1.01 KB
/
index.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<script setup lang="ts" generic="T extends any, O extends any">
import { useCursor } from 'ipad-cursor/vue'
useCursor()
defineOptions({
name: 'IndexPage',
})
const name = ref('')
const router = useRouter()
function go() {
if (name.value)
router.push(`/hi/${encodeURIComponent(name.value)}`)
}
</script>
<template>
<div>
<div i-carbon-campsite inline-block text-4xl data-cursor="block" />
<p>
<a rel="noreferrer" href="https://github.com/antfu/vitesse-lite" target="_blank">
Vitesse Lite
</a>
</p>
<p>
<em text-sm op75 data-cursor="text">Opinionated Vite Starter Template</em>
</p>
<div py-4 />
<TheInput
v-model="name"
placeholder="What's your name?"
autocomplete="false"
data-cursor="text"
@keydown.enter="go"
/>
<div>
<div
data-cursor="block"
class="m-3 text-sm btn"
:disabled="!name"
cursor-none
@click="go"
>
Go
</div>
</div>
</div>
</template>