-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from qianmoQ/feature-dev
[Page] [Form] Add some form function
- Loading branch information
Showing
10 changed files
with
359 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<div class="container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0"> | ||
<div class="w-full lg:grid lg:min-h-[600px] lg:grid-cols-2 xl:min-h-[800px]"> | ||
<div class="flex items-center justify-center py-12"> | ||
<div class="mx-auto grid w-[350px] gap-6"> | ||
<div class="grid gap-2 text-center"> | ||
<h1 class="text-3xl font-bold">{{ $t('form.common.formWithImage') }}</h1> | ||
<p class="text-balance text-muted-foreground">{{ $t('form.tip.formWithImage') }}</p> | ||
</div> | ||
<div class="grid gap-4"> | ||
<div class="grid gap-2"> | ||
<Label for="email">{{ $t('user.common.email') }}</Label> | ||
<Input id="email" type="email" :placeholder="$t('user.tip.emailHolder')" required/> | ||
</div> | ||
<div class="grid gap-2"> | ||
<div class="flex items-center"> | ||
<Label for="password">{{ $t('user.common.password') }}</Label> | ||
<a href="#" class="ml-auto inline-block text-sm underline">{{ $t('common.common.forgotPassword') }}?</a> | ||
</div> | ||
<Input id="password" type="password" required :placeholder="$t('user.tip.passwordHolder')"/> | ||
</div> | ||
<Button type="submit" class="w-full">{{ $t('common.common.signIn') }}</Button> | ||
<Button variant="outline" class="w-full">{{ $t('form.common.signInWithGoogle') }}</Button> | ||
</div> | ||
<div class="mt-4 text-center text-sm"> | ||
{{ $t('common.tip.signInNoAccount') }} | ||
<RouterLink to="#" class="underline">{{ $t('common.common.signUp') }}</RouterLink> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="hidden bg-muted lg:block"> | ||
<Image class="h-full w-full object-cover dark:brightness-[0.2] dark:grayscale"/> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { Button } from '@/components/ui/button' | ||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card' | ||
import { Input } from '@/components/ui/input' | ||
import { Label } from '@/components/ui/label' | ||
import { Image } from 'lucide-vue-next' | ||
export default defineComponent({ | ||
name: 'FormWithImage', | ||
components: { | ||
Button, | ||
Input, | ||
Label, | ||
Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, | ||
Image | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<template> | ||
<div class="container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0"> | ||
<div class="mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8"> | ||
<Card class="mx-auto max-w-sm"> | ||
<CardHeader> | ||
<CardTitle class="text-xl">{{ $t('form.common.formWithSplitField') }}</CardTitle> | ||
<CardDescription>{{ $t('form.tip.formWithSplitField') }}</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<div class="grid gap-4"> | ||
<div class="grid grid-cols-2 gap-4"> | ||
<div class="space-y-2"> | ||
<Label for="first-name">{{ $t('form.common.firstName') }}</Label> | ||
<Input id="first-name" :placeholder="$t('form.tip.firstNameHolder')" required/> | ||
</div> | ||
<div class="grid gap-2 mt-2"> | ||
<Label for="last-name">{{ $t('form.common.lastName') }}</Label> | ||
<Input id="last-name" :placeholder="$t('form.tip.lastNameHolder')" required/> | ||
</div> | ||
</div> | ||
<div class="grid gap-2"> | ||
<Label for="email">{{ $t('user.common.email') }}</Label> | ||
<Input id="email" type="email" :placeholder="$t('user.tip.emailHolder')" required/> | ||
</div> | ||
<div class="grid gap-2"> | ||
<Label for="password">{{ $t('user.common.password') }}</Label> | ||
<Input id="password" type="password" :placeholder="$t('user.tip.passwordHolder')"/> | ||
</div> | ||
<Button type="submit" class="w-full">{{ $t('common.common.signUp') }}</Button> | ||
<Button variant="outline" class="w-full">{{ $t('form.common.signInWithGoogle') }}</Button> | ||
</div> | ||
<div class="mt-4 text-center text-sm"> | ||
{{ $t('common.tip.signUpHasAccount') }} | ||
<a href="#" class="underline">{{ $t('common.common.signIn') }}</a> | ||
</div> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { Button } from '@/components/ui/button' | ||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card' | ||
import { Input } from '@/components/ui/input' | ||
import { Label } from '@/components/ui/label' | ||
export default defineComponent({ | ||
name: 'FormWithSplitField', | ||
components: { | ||
Button, | ||
Input, | ||
Label, | ||
Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<template> | ||
<div class="container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0"> | ||
<div class="mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8"> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle class="text-2xl">{{ $t('form.common.formWithThird') }}</CardTitle> | ||
<CardDescription>{{ $t('form.tip.formWithThird') }}</CardDescription> | ||
</CardHeader> | ||
<CardContent> | ||
<div class="grid gap-4"> | ||
<div class="grid gap-2"> | ||
<Label for="email">{{ $t('user.common.email') }}</Label> | ||
<Input id="email" type="email" :placeholder="$t('user.tip.emailHolder')" required/> | ||
</div> | ||
<div class="grid gap-2"> | ||
<div class="flex items-center"> | ||
<Label for="password">{{ $t('user.common.password') }}</Label> | ||
<a href="#" class="ml-auto inline-block text-sm underline">{{ $t('common.common.forgotPassword') }}?</a> | ||
</div> | ||
<Input id="password" type="password" required :placeholder="$t('user.tip.passwordHolder')"/> | ||
</div> | ||
<Button type="submit" class="w-full">{{ $t('common.common.signIn') }}</Button> | ||
<Button variant="outline" class="w-full">{{ $t('form.common.signInWithGoogle') }}</Button> | ||
</div> | ||
<div class="relative my-4"> | ||
<div class="absolute inset-0 flex items-center"> | ||
<span class="w-full border-t"/> | ||
</div> | ||
<div class="relative flex justify-center text-xs uppercase"> | ||
<span class="bg-background px-2 text-muted-foreground">{{ $t('user.common.continueWith') }}</span> | ||
</div> | ||
</div> | ||
<div class="flex items-center gap-2"> | ||
<Button variant='outline' class="w-full"> | ||
<Github class="mr-2 h-4 w-4"/> | ||
GitHub | ||
</Button> | ||
<Button variant='outline' class="w-full"> | ||
<Facebook class="mr-2 h-4 w-4"/> | ||
</Button> | ||
</div> | ||
<div class="mt-4 text-center text-sm"> | ||
{{ $t('common.tip.signInNoAccount') }} | ||
<RouterLink to="#" class="underline">{{ $t('common.common.signUp') }}</RouterLink> | ||
</div> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { Button } from '@/components/ui/button' | ||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card' | ||
import { Input } from '@/components/ui/input' | ||
import { Label } from '@/components/ui/label' | ||
import { Facebook, Github } from 'lucide-vue-next' | ||
export default defineComponent({ | ||
name: 'FormWithThird', | ||
components: { | ||
Facebook, Github, | ||
Button, | ||
Input, | ||
Label, | ||
Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle | ||
} | ||
}) | ||
</script> |
Oops, something went wrong.