forked from antfu-collective/vitesse-lite
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.vue
45 lines (39 loc) · 911 Bytes
/
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
<script setup lang="ts">
import { useRouter } from 'vue-router'
import TheInput from '~/components/TheInput.vue'
const name = $ref('')
const router = useRouter()
const go = () => {
if (name)
router.push(`/hi/${encodeURIComponent(name)}`)
}
</script>
<template>
<div>
<div class="i-carbon-campsite text-4xl inline-block" />
<p>
<a rel="noreferrer" href="https://github.com/skywalker512/rspacksse-lite" target="_blank">
Rspacksse Lite
</a>
</p>
<p>
<em class="text-sm opacity-75">Opinionated Rspack Starter Template</em>
</p>
<div class="py-4" />
<TheInput
v-model="name"
placeholder="What's your name?"
autocomplete="false"
@keydown.enter="go"
/>
<div>
<button
class="m-3 text-sm btn"
:disabled="!name"
@click="go"
>
Go
</button>
</div>
</div>
</template>