filter.js 293 B

123456789101112131415
  1. import Vue from 'vue'
  2. import { config } from '@/config/config'
  3. //保留两位小数
  4. Vue.filter('keepTwoNum',function(val){
  5. let value = Number(val)
  6. return value.toFixed(2)
  7. })
  8. //链接加时间戳
  9. Vue.filter("timestamp", function(link) {
  10. return link + '?t=' + new Date().getTime();
  11. });