Proper way to express switch statement with Vue data bindings
问题 I have a simple use case for a range input that changes a button's text whenever the range's value changes. I'm using Vue.js to bind data from an object that is simply storing the range value, and spitting it back out to the button (and the counter, for easier debugging). In the following fiddle, when the range value is greater than 0, the text reads "Buy", or else it reads "Sell". Fiddle: http://jsfiddle.net/svwa79pe/1/ What I want to do is show three button states depending on whether the