Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

292
Views
How to remove default value from input number in vue?

I have a Vue input number component which accepts precision upto five decimal points. Its all fine except it shows the default value 0.000000 which is kinda boring to look at because this field is optional. I am using el-input-number component from the element-ui. Is there any tweak to remove the boring default value of 0.000000 ?

<span class="custom-label">
Optional Multiplier Amount
</span>
<el-input-number
   :controls="false"
   v-model="form.multiplier_amount"
   :size="size"
   :step="0.1"
   :precision="5"
   class="optional-multiplier"
   />

data(){
 return{
  form: {
    multiplier_amount: null
        }
       }
      }

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Just set it as undefined:

new Vue({
  el: "#demo",
  data(){
    return{
      form: {
        multiplier_amount: undefined
      },
    }
  }
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<div id="demo">
  <span class="custom-label">
    Optional Multiplier Amount
  </span>
  <el-input-number
    :controls="false"
    v-model="form.multiplier_amount"
    :step="0.1"
    class="optional-multiplier"
    :precision="5"
  />
</div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!