Posted inProgramming / VueJs

vuejs Simple calculator web Application

vuejs Simple calculator web Application

In this Post We Will Explain About is vuejs Simple calculator web Applicationvuejs Simple calculator web Application With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Vuejs calculator web application example Example

In this post we will show you Best way to implement Simple calculator implemented with Vuejs, hear for How to create a simple calculator using Vuejs with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

A simple calculator in Vuejs

In this Example,First of all Add or Include External Libs Like as a(j Query, css etc..), and then create a simple index.php or index.html page.After that crate a simple java script file like as a index.js or main.js, It is also add your web-application First Header Part to some priority set.After that Include your relevant CSS Class.

Include External Libs

https://unpkg.com/vue

index.html

  

Create calculator with VueJs

{{ preview }}

0

index.js

  new Vue({
    el: '#liveApp',
    data() {
      return {
        preview: '',
        computed: false,
        digitLimitReached: false
      };
    },
    methods: {
      CalcUpdate: function(e) {
        return this.preview.length > 16
          ? (this.preview = 'Ops! Digit Limit Met!')
          : (this.preview += e.target.value);
      },
      calcOpt: function(e) {
        this.preview = this.preview + e.target.value;
      },
      resetAll: function() {
        this.preview = '';
        this.computed = false;
      },
      ac: function() {
        this.resetAll();
      },
      ce: function() {
        return this.computed
          ? this.resetAll()
          : (this.preview = this.preview
              .split(/\D/)
              .filter(el => el !== this.preview.split(/\D/).slice(-1)[0])[0]);
      },
      compute: function() {
        this.computed = true;
        this.preview = Math.round(eval(this.preview) * 100) / 100;
      }
    }
  });

style.css

@import url('https://fonts.googleapis.com/css?family=Raleway');

body {
  font-family: 'Raleway', serif;
  background: orange;
  color: #3d3d3d;
}

.Live-Calc-container {
  width: 99%;
  margin: 0 auto;
  background: gray;
  overflow: auto;
  border-radius: 10px;
  box-shadow: 1px 1px 1px 5px #3c3939;
}

@media screen and (min-width: 800px) {
.Live-Calc-container {
    width: 20%;
  }
}

.lbtan {
  font-family: 'Raleway', serif;
  font-size: 40px;
  border: none;
  outline: none;
  background: #333;
  color: #fff;
  width: 60px;
  height: 50px;
  margin: 5px;
  border-radius: 5px;
  padding: 0;
  border-bottom: 3px solid white;
  box-shadow: 2px 3px 7px #3d3d3d;
}

h1 {
  font-size: 30px;
  text-align: center;
}
.current:current {
  position: relative;
  top: 3px;
}

.live-lbtanno {
  width: 70px;
  height: 60px;
}

.clear {
  background: red;
}

.live-preview-calc {
  text-align: center;
  width: 90%;
  background: #333;
  color: #fff;
  font-size: 40px;
  margin: 15px auto 10px auto;
  padding: 1px;
  border-radius: 8px;
  box-shadow: 2px 3px 7px #3d3d3d;
}

.calculator-keyboard {
  align-items: center;
  margin-bottom: 15px;
  flex-direction: row;
  justify-content: space-around;
}

.calculator-numbers {
  width: 280px;
}

.calculator-calcOpts {
  width: 80px;
}

a {
  text-decoration: none;
  color: #3d3d3d;
}

footer {
  text-align: center;
  margin-top: 15px;
}

A simple calculator made with VueJs

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is A simple calculator made by vuejs And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype