Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@satrong/v-input
Advanced tools
Readme
English | 中文
A Vue directive to control HTML input/textarea element value. Support Vue 2 and Vue 3.
npm install @satrong/v-input
For Vue 2.x:
import Vue from 'vue'
import vInput from '@satrong/v-input'
Vue.use(vInput)
new Vue({
// ...
}).$mount('#app')
For Vue 3.x:
import { createApp } from 'vue'
import vInput from '@satrong/v-input'
createApp({
// ...
}).use(vInput).mount('#app')
The format is as follow:
<input v-model="arg" v-input:arg.modifier="bindValue" />
Example:
<template>
<div>
<input v-model="age" v-input:age.postive.integer="[0,80]">
<input v-model="form.total" v-input:form:total.number>
</div>
</template>
<script>
export default {
data() {
return {
age: '',
form: {
total: ''
}
}
}
}
</script>
Corresponding to the value of v-model
, replace .
with :
when the value include .
.
For example, the value is a.b.c
(ie. v-model="a.b.c"
), and the arg
should be a:b:c
(ie. v-input:a:b:c
).
number
Any number stringinteger
positive
negative
!0
Not zero[min, max]
Limit the value range. Trigger by blur event.(val) => string
Custom function. ⚠ DONOT RETURN DYNAMIC VALUEFAQs
A Vue directive to control HTML input/textarea element value. Support Vue 2 and Vue 3.
The npm package @satrong/v-input receives a total of 0 weekly downloads. As such, @satrong/v-input popularity was classified as not popular.
We found that @satrong/v-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.