GithubHelp home page GithubHelp logo

mibsbalsante / vuetify-money-3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juareznasato/vuetify-money

0.0 0.0 1.0 32.54 MB

vuetify-money for vuetify 3

Shell 24.34% JavaScript 11.54% HTML 4.01% Vue 60.11%

vuetify-money-3's Introduction

vuetify-money-3

This is a fork from vuetify-money updated to work with Vuetify 3.x and Vue 3.x. Please refer to the original project if you need Vue 2.x compatibility.

v-text-field: R$ 12.345.678,90

v-model: 12345678.90

Dependency

  • VueJS
  • Vuetify 3.x

Install

Only available installing with GitHub repo

$ npm install github:mibsbalsante/vuetify-money-3

Register the component globally in your main.js file:

import VuetifyMoney from "vuetify-money-3";
app.use(VuetifyMoney);

Or import locally as a component:

import { VuetifyMoney } from "vuetify-money-3";

export default {
  props: {},
  components: { VuetifyMoney },
  render: () => {}
};

How to use

<template>
  <vuetify-money
    v-model="value"
    :label="label"
    :placeholder="placeholder"
    :readonly="readonly"
    :disabled="disabled"
    :variant="variant"
    :clearable="clearable"
    :valueWhenIsEmpty="valueWhenIsEmpty"
    :options="options"
    :properties="properties"
  />
  Parent v-model: {{ value }}
</template>
<script>
  export default {
    data: () => ({
      value: "1234567.89",
      label: "Value",
      placeholder: " ",
      readonly: false,
      disabled: false,
      variant: "outlined",
      clearable: true,
      valueWhenIsEmpty: "",
      options: {
        locale: "pt-BR",
        prefix: "R$",
        suffix: "",
        length: 11,
        precision: 2
      },
      properties: {
        hint: "my hint"
        // You can add other v-text-field properties, here.
      }
    })
  };
</script>

Properties

Property Type Default Description
label String “” v-text-field property
placeholder String undefined v-text-field property
readonly Boolean false v-text-field property
error Boolean false v-text-field property
hideDetails Boolean false v-text-field property
rules Array or String [] v-text-field property
disabled Boolean false v-text-field property
variant String filled v-text-field property
density String default v-text-field property
clearable Boolean false v-text-field property
bgColor String white v-text-field property
valueWhenIsEmpty String “” value when TextField is empty. Ex: 0, “”, null

*** If you need to use other v-text-field properties, you can add them in properties object.

Options

Option Type Default Description
locale String pt-BR Locale to format number
prefix String “” Currency symbol
suffix String “” % or others
length Number 11 Number length
precision Number 2 Decimal precision
Option Type Default Description
min Number 0 Value min
minEvent String 0 Custom event name
max Number - Value max
maxEvent String - Custom event name

vuetify-money-3's People

Contributors

mibsbalsante avatar juareznasato avatar andrewgrcmc avatar rsornellas avatar lindsaykwardell avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.