zrg
2025-09-05 46cc7a29dc1f9b3dffee5cdcb9b7f9dfdac3b16d
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()