generated from kingyue737/vitify-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhomepage.vue
68 lines (64 loc) · 1.36 KB
/
homepage.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<script setup lang="ts">
const { t } = useI18n()
const name = ref('')
function sayHi() {
Message.success(`Hi, ${name.value}!`)
}
function warning() {
Message.warning(t('warnMessage', [name.value]))
}
</script>
<template>
<div>
<div class="wrapper">
<v-icon class="logo mb-4">$vitify</v-icon>
<p class="mb-10">{{ t('description') }}</p>
<v-text-field
v-model="name"
placeholder="Hello World"
outlined
:label="t('inputLabel')"
class="input mx-auto"
/>
<v-btn-toggle></v-btn-toggle>
<v-btn :disabled="!name" class="mr-2" color="primary" @click="sayHi">
{{ t('confirm') }}
</v-btn>
<v-btn :disabled="!name" @click="warning">{{ t('cancel') }}</v-btn>
</div>
</div>
</template>
<style lang="scss" scoped>
.wrapper {
position: relative;
top: calc(50vh - 330px);
text-align: center;
opacity: 0.7;
}
.logo {
font-size: 10em;
opacity: 0.2;
}
.input {
width: 300px;
}
</style>
<route lang="json">
{
"meta": {
"title": "homepage",
"icon": "$mdi-home",
"drawerIndex": 0
}
}
</route>
<i18n lang="yaml">
en:
description: Opinionated Admin Starter Template
inputLabel: What's your name?
warnMessage: How dare you refuse me, {0}!
zh:
description: 固执己见的后台项目模板
inputLabel: 你的名字?
warnMessage: 你胆敢拒绝我, {0}!
</i18n>