mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 02:32:29 +09:00
1.7 KiB
1.7 KiB
state
| state | ||||
|---|---|---|---|---|
|
Bi-Directional addons
Inputs can have addons on both sides. You can even attach a select element
to your <VControl /> component. Please refer to the code example
for more details about usage.
Note that if you need multiple inputs
(like a <VSelect> addons for currency selection),
you should wrap this other input with <VControl subcontrol> or
<VField subcontrol> component.
<script setup lang="ts">
const currency = ref('$')
</script>
<template>
<VField addons>
<!-- currency selector with subcontrol -->
<VControl subcontrol>
<VSelect v-model="currency">
<VOption value="$">
$
</VOption>
<VOption value="£">
£
</VOption>
<VOption value="€">
€
</VOption>
</VSelect>
</VControl>
<!-- amount input -->
<VControl expanded>
<VInput
v-model="amount"
type="text"
placeholder="Amount of money"
/>
</VControl>
<!-- submit -->
<VControl>
<VButton color="primary">
Send Payment
</VButton>
</VControl>
</VField>
</template>