Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

v-currency-field

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-currency-field

Vue currency input/directive mask

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.8K
decreased by-6.02%
Maintainers
1
Weekly downloads
 
Created
Source

Currency Mask for Vuetify

Features

  • All features from v-money as v-text-field of vuetify.

Usage

Globally

import Vue from 'vue'
import currency from 'v-currency-field'

import 'v-currency-field/dist/index.css'

Vue.use(currency)

Example

<template>
  <div>
    <v-currency-field label="Value" v-bind="currency_config" :error-messages="errors.price" v-model="price"></v-currency-field>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        errors: {},
        price: 123.45,
        currency_config: {
          decimal: ',',
          thousands: '.',
          prefix: 'R$ ',
          suffix: ' #',
          precision: 2,
          masked: false,
          allowBlank: false,
          min: Number.MIN_SAFE_INTEGER,
          max: Number.MAX_SAFE_INTEGER
        }
      }
    }
  }
</script>

Properties

All v-money properties

propertyRequiredTypeDefaultDescription
precisiontrueNumber2How many decimal places
decimalfalseString"."Decimal separator
thousandsfalseString","Thousands separator
prefixfalseString""Currency symbol followed by a Space, like "R$ "
suffixfalseString""Percentage for example: " %"
maskedfalseBooleanfalseIf the component output should include the mask or not
allowBlankfalseBooleanfalseIf the field can start blank and be cleared out by user
minfalseNumberNumber.MIN_SAFE_INTEGERThe min value allowed
maxfalseNumberNumber.MAX_SAFE_INTEGERThe max value allowed

And all vuetify properties

propertyRequiredType
appendOuterIconfalseString
appendOuterIconCbfalseFunction
autofocusfalseBoolean
boxfalseBoolean
browserAutocompletefalseString
clearablefalseBoolean
clearIconfalseString
clearIconCbfalseNumber
colorfalseString
flatfalseBoolean
fullWidthfalseBoolean
labelfalseString
outlinefalseBoolean
placeholderfalseString
prependInnerIconfalseString
prependInnerIconCbfalseFunction
reversefalseBoolean
singleLinefalseBoolean
solofalseBoolean
soloInvertedfalseBoolean

References

  • https://github.com/64robots/v-money
  • https://vuetifyjs.com/pt-BR/components/text-fields

Keywords

FAQs

Package last updated on 05 Oct 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc