import Vue from 'vue'
Vue.mixin({
  methods: {
    imgCompression(src, width) {
      if (/\?x-oss-process=video/.test(src)) {
        return src
      }
      if (src) {
        return `${src}?x-oss-process=image/resize,w_${width},limit_0,m_mfit`
      }
      return src
    }
  },
})