const imgMark = (Vue) => { Vue.prototype.IMadd = function (url) { // 图片添加水印 if (url && url.indexOf('_adm0') === -1) { return `${url}_adm0` } else { return url } } Vue.prototype.IMdel = function (url) { // 图片删除水印 if (url && url.indexOf('_adm0') > -1) { return url.substring(0, url.length - 5) } else { return url } } } export default imgMark