Vue: Vue 2 returns input value as string

Created on 1 Aug 2016  ·  1Comment  ·  Source: vuejs/vue

Vue.js version

2.0.0-beta.6

Reproduction Link

https://jsfiddle.net/j9kp8jfe/2/

Steps to reproduce

Slide the slider

What is Expected?

I would expect xyz to be a number so + would perform addition, as in Vue 1 https://jsfiddle.net/j9kp8jfe/1/

What is actually happening?

xyz is a string, so 10 is being concatenated. Note that number attribute is being used https://vuejs.org/guide/forms.html#number

Most helpful comment

Number is now a modifier, use v-model.number instead.

>All comments

Number is now a modifier, use v-model.number instead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bdedardel picture bdedardel  ·  3Comments

seemsindie picture seemsindie  ·  3Comments

loki0609 picture loki0609  ·  3Comments

lmnsg picture lmnsg  ·  3Comments

finico picture finico  ·  3Comments