filter.js 243 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 module.exports = function (Vue) { Vue.filter('html', function (val,length) { var temp=val+" " temp = temp.replace(/<\/?[^>]*>/g, ""); if(length && length>0){ temp=temp.substr(0,length)+'...' } return temp; }); };