Socket
Socket
Sign inDemoInstall

vue-input-calculator

Package Overview
Dependencies
0
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-input-calculator

Calculator input component. Mobile friendly.


Version published
Weekly downloads
181
increased by132.05%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

vue-input-calculator

Software License Latest Version on NPM npm Vue 3.x

Calculator interface for input field. Touch & Keyboard input. Vue.js component.

Vue 2 < ver. 1.0.0

Vue 3 > ver. 1.0.0

Demo

View demo

demo

Install

yarn add vue-input-calculator

Or

npm install --save vue-input-calculator

Add to project

Global
// main.js
import VueInputCalculator from "vue-input-calculator";
Vue.component('vue-input-calculator', VueInputCalculator);
Local Usage
<template>
  <div>
      <input type="number" v-model.number="targetValue"/>
      <VueInputCalculator enableKeyboard v-model="targetValue">
        CALC
      </VueInputCalculator>
  </div>
</template>
<script>
  import VueInputCalculator from "vue-input-calculator";
  export default {
    name: 'component.vue',
    components: {VueInputCalculator},
    data() {
      return { targetValue: 0 }
    }
  }
</script>

Setup

Parameters

Props(Parameter)TypeDefaultDescription
v-model (required)String, Number-target input value
auto-applyBooleanfalseauto continue/close on calc result
enable-keyboardBooleanfalseenable keyboard input
persistentBooleanfalsedisable backdrop click to cancel (outside click)
readonly-inputBooleantruecalculator input read only
is-history-logsBooleantrueshow math operations log
z-indexString, Number9999layer calculator z-index position
placein-place|modalmodalin-place puts interface in its DOM position, modal or other displays on click input.
trigger-wrapper-classString-trigger for open calculator class styles
text-colorString#ffffffcalculator text color
bg-colorString#2f2f31calculator background color
event-buttons-bg-colorString#424345calculator buttons color(c, ›)
number-buttons-bg-colorString#616163calculator buttons color(0-9.)
action-buttons-bg-colorString#f49e3fcalculator buttons color(+-*=)
action-success-button-bg-colorString#3ff451calculator OK button color

License

The MIT License

Vue CLI configuration

See Configuration Reference.

Keywords

FAQs

Last updated on 13 May 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc