deeke-script-app 1.8.8 → 1.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,6 +42,30 @@ interface FloatDialogs {
|
|
|
42
42
|
* @param visible 是否显示
|
|
43
43
|
*/
|
|
44
44
|
public setFloatWindowVisible(visible: boolean): void;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 显示确认对话框,支持动态修改内容和回调函数
|
|
48
|
+
* 此方法会阻塞当前线程,直到用户点击按钮或回调函数返回true
|
|
49
|
+
* 注意:此方法需要在初始化FloatDialogs时传入scope参数才能使用
|
|
50
|
+
* @param title 弹窗标题
|
|
51
|
+
* @param content 弹窗内容
|
|
52
|
+
* @param confirmText 确定按钮文字
|
|
53
|
+
* @param cancelText 取消按钮文字
|
|
54
|
+
* @param callback 回调函数,接收一个dialog对象作为参数,可以通过dialog.setContent()动态修改弹窗内容。如果回调函数返回true,则自动关闭对话框;返回false或不返回值,则继续等待用户点击按钮
|
|
55
|
+
* @returns 如果用户点击了确定按钮返回true,点击了取消按钮返回false
|
|
56
|
+
*/
|
|
57
|
+
public confirm(title: string, content: string, confirmText: string, cancelText: string, callback: (dialog: FloatDialog) => boolean | void): boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* FloatDialog 接口,用于管理对话框状态
|
|
62
|
+
*/
|
|
63
|
+
interface FloatDialog {
|
|
64
|
+
/**
|
|
65
|
+
* 设置对话框内容
|
|
66
|
+
* @param content 对话框内容
|
|
67
|
+
*/
|
|
68
|
+
setContent(content: string): void;
|
|
45
69
|
}
|
|
46
70
|
|
|
47
71
|
export { };
|
|
@@ -49,6 +49,15 @@ interface KeyBoards {
|
|
|
49
49
|
* 发送空格键
|
|
50
50
|
*/
|
|
51
51
|
public pressSpace(): boolean;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 智能方法:根据当前状态自动跳转到合适的页面
|
|
55
|
+
* - 如果已经是默认输入法,返回 true
|
|
56
|
+
* - 如果未启用,跳转到启用页面(用户需要先启用)
|
|
57
|
+
* - 如果已启用但未设为默认,弹出输入法选择界面(用户可以选择为默认)
|
|
58
|
+
* @returns 返回当前输入法是否已设为默认(true表示已是默认,false表示需要用户操作)
|
|
59
|
+
*/
|
|
60
|
+
public showInputMethodPicker(): boolean;
|
|
52
61
|
}
|
|
53
62
|
|
|
54
63
|
export { };
|
package/deekeScript.json
CHANGED
|
@@ -119,6 +119,26 @@
|
|
|
119
119
|
"step": 1,
|
|
120
120
|
"value": 60
|
|
121
121
|
},
|
|
122
|
+
{
|
|
123
|
+
"type": "switch",
|
|
124
|
+
"value": true,
|
|
125
|
+
"name": "switch",
|
|
126
|
+
"label": "开启后,子表单也开启",
|
|
127
|
+
"childrenParams": [
|
|
128
|
+
{
|
|
129
|
+
"type": "text",
|
|
130
|
+
"label": "子表单1",
|
|
131
|
+
"name": "child_text1",
|
|
132
|
+
"value": ""
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"type": "number",
|
|
136
|
+
"label": "子表单2",
|
|
137
|
+
"name": "child_number1",
|
|
138
|
+
"value": 0
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
122
142
|
{
|
|
123
143
|
"type": "checkboxGroup",
|
|
124
144
|
"label": "运行时间",
|
package/deekeScript.schema.json
CHANGED
|
@@ -607,6 +607,13 @@
|
|
|
607
607
|
"type": "boolean",
|
|
608
608
|
"description": "是否隐藏",
|
|
609
609
|
"default": false
|
|
610
|
+
},
|
|
611
|
+
"childrenParams": {
|
|
612
|
+
"type": "array",
|
|
613
|
+
"description": "子表单参数列表(仅在 switch 类型下使用,当 switch 开启时显示)",
|
|
614
|
+
"items": {
|
|
615
|
+
"$ref": "#/definitions/param"
|
|
616
|
+
}
|
|
610
617
|
}
|
|
611
618
|
}
|
|
612
619
|
},
|