Files
heroui-vue/apps/docs/demos/input-group-disabled.vue

44 lines
1.0 KiB
Vue

<script setup lang="ts">
import {
InputGroup,
InputGroupInput,
InputGroupPrefix,
InputGroupSuffix,
Label,
TextField,
} from "@heroui-vue/components";
import { IconMail } from "@tabler/icons-vue";
</script>
<template>
<div class="flex flex-col gap-4">
<TextField
class="w-full max-w-[280px]"
default-value="name@email.com"
is-disabled
name="email"
>
<Label>邮箱地址</Label>
<InputGroup>
<InputGroupPrefix>
<IconMail class="size-4 text-muted" aria-hidden="true" />
</InputGroupPrefix>
<InputGroupInput class="w-full max-w-[280px]" />
</InputGroup>
</TextField>
<TextField
class="w-full max-w-[280px]"
default-value="10"
is-disabled
name="price"
>
<Label>设置价格</Label>
<InputGroup>
<InputGroupPrefix>$</InputGroupPrefix>
<InputGroupInput class="w-full max-w-[200px]" type="number" />
<InputGroupSuffix>USD</InputGroupSuffix>
</InputGroup>
</TextField>
</div>
</template>