提升用户体验之线上环境不打印日志 龚思凯 2025-12-29 18 阅读1分钟 将window.console.log置为空函数 if (process.env.NODE_ENV === 'production') { window.console.log = () => {}; }