迁移奖励金币弹窗入口
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// 聊天室职务奖励金币弹窗入口,提供 openRewardModal 全局兼容函数。
|
||||
|
||||
/**
|
||||
* 打开奖励金币独立弹窗。
|
||||
*
|
||||
* @param {string} username
|
||||
* @returns {void}
|
||||
*/
|
||||
export function openRewardModal(username) {
|
||||
const container = document.getElementById("reward-modal-container");
|
||||
if (!window.Alpine || !container) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.Alpine.$data(container)?.open?.(username);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暴露奖励金币弹窗入口给存量按钮调用。
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
export function bindRewardModalControls() {
|
||||
if (typeof window === "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
window.openRewardModal = openRewardModal;
|
||||
}
|
||||
Reference in New Issue
Block a user