utils/common.js
@@ -303,6 +303,13 @@ } innerAudioContext.play(); // 播放音频 } replaceWithFunction(str, handler) { return str.replace(/\{(.+?)\}/g, (match, key) => { // 调用处理函数,传入匹配到的键 return handler(key, match); }); } } export const CommonUtils = new commonUtils()