/* * @Author: 小明丶 * @Date: 2020-09-03 10:32:28 * @LastEditors: 小明丶 * @LastEditTime: 2020-09-03 10:53:59 * @Description: 是否显示控制台打印值,用this.$log()打印到控制台 DEBUG=true为调试模式输出到控制台,DEBUG=false不输出到控制台 */ const DEBUG = true var log = function(...araguments){ if(DEBUG){ var arr = Array.prototype.slice.call(araguments) } } export default { install(Vue,options){ Vue.prototype.$log = log; } }