0.1.1 • Published 1 year ago

@gurso/vue-use-form v0.1.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Vue Use Form

Fields

example

html

<template>
    <input ref="refInput" />
<template>

js

import { useField, useFieldGroup } from "@gurso/vue-use-form"

const refInput = ref()
const { dirty, touched, valid, blank, model } = useField({ field: refInput })
// there also pristine, invalid, untouched

respectives CSS class are added to the element.

You can pass default value in argument:

const { dirty, touched, valid, blank, model } = useField({ field: refInput, value: "foo" })

if you use v-model on element, you should pass to:

html

<template>
    <input ref="refInput" v-model="foo" />
<template>

js

const model = ref("foo")
const refInput = ref()
const { dirty, touched, valid, blank } = useField({ field: refInput, model })
0.1.1

1 year ago

0.1.0

1 year ago

0.0.16

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago