$('#..').on('input', function(){
var $el = $(this);
if($el.val().length){
$el.addClass('myClass');
} else {
$el.removeClass('myClass');
}
});
<input type="text" placeholder="text" v-model.lazy="str" v-bind:class="class | str">
data: {
str: null
},