1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-06-18 23:43:02 +08:00

fix(ALAutoScript*Dialog): 统一编排窗口生成的 Lua 函数名与 ASEngine 运行时一致

- date_add → dateadd, time_add → timeadd
- CURRENT_DATE() → datenow(), CURRENT_TIME() → timenow()
- 编辑窗口 Date/Time 字面量按钮模板同步更新为 date()/time() 格式

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 20:25:19 +08:00
parent eb8da498a2
commit f7167c13f4
4 changed files with 30 additions and 27 deletions
+4 -4
View File
@@ -329,8 +329,8 @@ class ALAutoScriptEditDialog(QDialog):
]
self.addButtonsToGrid(literalLayout, bool_buttons, 0, 0, 3)
dateTimeButtons = [
("日期", '"2099-01-01"'),
("时间", '"00:00"'),
("日期", 'date(2026, 1, 1)'),
("时间", 'time(0, 0)'),
]
self.addButtonsToGrid(literalLayout, dateTimeButtons, 1, 0, 3)
hintButtons = [
@@ -358,8 +358,8 @@ class ALAutoScriptEditDialog(QDialog):
funcButtons = [
("datenow()", "datenow()", "返回当前日期的 Unix 时间戳"),
("timenow()", "timenow()", "返回当前时间在一天中的分钟数"),
("dateadd(d, n)", "dateadd(, )", "日期偏移: dateadd(日期时间戳, 天数)"),
("timeadd(t, n)", "timeadd(, )", "时间偏移: timeadd(分钟数, 分钟数)"),
("dateadd(day, n)", "dateadd(, )", "日期偏移: dateadd(日期时间戳, 天数)"),
("timeadd(time, n)", "timeadd(, )", "时间偏移: timeadd(分钟数, 分钟数)"),
]
for i, (text, template, tooltip) in enumerate(funcButtons):
btn = QPushButton(text)