优化代码补注释

This commit is contained in:
dgflash
2025-08-14 09:16:09 +08:00
parent c857db0386
commit 6d9a8f4050
3 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
/** 框架提示资源路径 */
export enum PromptResType {
/** 飘动提示 */
Toast = 'common/prefab/notify',

View File

@@ -5,7 +5,6 @@
* @LastEditTime: 2023-01-09 11:52:38
*/
import { Node } from "cc";
import { Uiid } from "./LayerEnum";
import { UIConfig } from "./UIConfig";
/*** 界面回调参数对象定义 */

View File

@@ -11,9 +11,13 @@ import { UIConfig } from "./UIConfig";
/** 模式弹窗数据 */
type DialogParam = {
uiid: number;
/** 弹窗唯一编号 */
uiid: string;
/** 窗口配置 */
config: UIConfig;
/** 窗口附加参数 */
params?: any;
/** 窗口回调 */
callbacks?: UICallbacks;
}
@@ -24,7 +28,7 @@ export class LayerDialog extends LayerPopUp {
/** 窗口调用参数队列 */
private params: Array<DialogParam> = [];
add(uiid: number, config: UIConfig, params?: any, callbacks?: UICallbacks) {
add(uiid: string, config: UIConfig, params?: any, callbacks?: UICallbacks) {
// 控制同一时间只能显示一个模式窗口
if (this.ui_nodes.size > 0) {
this.params.push({
@@ -40,7 +44,7 @@ export class LayerDialog extends LayerPopUp {
}
/** 显示模式弹窗 */
private show(uiid: number, config: UIConfig, params?: any, callbacks?: UICallbacks) {
private show(uiid: string, config: UIConfig, params?: any, callbacks?: UICallbacks) {
let vp = this.ui_cache.get(config.prefab);
if (vp == null) {
vp = new ViewParams();