gohttpdUi/src/views/Login/components/LoginForm.vue

43 lines
781 B
Vue
Raw Normal View History

2022-01-03 18:01:43 +08:00
<script setup lang="ts">
import { Form } from '@/components/Form'
2022-01-04 16:53:13 +08:00
import { useI18n } from '@/hooks/web/useI18n'
import { ElButton } from 'element-plus'
const { t } = useI18n()
2022-01-03 18:01:43 +08:00
const schema: FormSchema[] = [
{
field: 'username',
2022-01-04 16:53:13 +08:00
label: t('login.username'),
component: 'Input',
colProps: {
span: 24
}
2022-01-03 18:01:43 +08:00
},
{
field: 'password',
2022-01-04 16:53:13 +08:00
label: t('login.password'),
component: 'InputPassword',
colProps: {
span: 24
},
componentProps: {
style: {
width: '100%'
}
}
},
{
field: 'login'
2022-01-03 18:01:43 +08:00
}
]
</script>
<template>
2022-01-04 16:53:13 +08:00
<Form :schema="schema" label-position="top">
<template #login>
<ElButton type="primary" class="w-[100%]">{{ t('login.login') }}</ElButton>
</template>
</Form>
2022-01-03 18:01:43 +08:00
</template>