diff --git a/src/components/composer/common/VariableInput.vue b/src/components/composer/common/VariableInput.vue
index 9fd9b8c..bb5b605 100644
--- a/src/components/composer/common/VariableInput.vue
+++ b/src/components/composer/common/VariableInput.vue
@@ -9,154 +9,39 @@
>
- 清除选中的变量
-
-
- {{
- (isString
- ? "当前类型是:字符串"
- : "当前类型是:变量、数字、表达式等") +
- (disableToggleType ? "" : ",点击切换")
- }}
+ {{ typeToggleTooltip }}
-
-
-
-
-
- {{ getItemLabel(item) }}
-
-
-
-
- 确定 (已选择 {{ selectedItems.length }} 项)
-
-
-
-
-
-
- {{ getItemLabel(item) }}
-
-
-
-
-
-
- 选择文件
-
+ />
+
+
+
+
-
-
-
-
- 选择变量
-
-
-
-
-
-
-
-
- {{ variable.name }}
-
-
- 来自: {{ variable.sourceCommand.label }}
-
-
-
-
-
-
-
-
-
-
-
- 当前命令没有可用变量
-
-
-
点击其他命令卡片右上角的
-
-
按钮添加输出变量
-
-
-
-
-
-
-
-
+
@@ -165,10 +50,17 @@
@@ -427,106 +228,4 @@ export default defineComponent({
margin-left: 5px;
transition: all 0.6s ease;
}
-
-.variable-dropdown.prepend-btn {
- background-color: rgba(0, 0, 0, 0.02);
-}
-
-.body--dark .variable-dropdown.prepend-btn {
- background-color: rgba(255, 255, 255, 0.02);
-}
-
-.clear-btn:hover {
- color: var(--q-negative);
-}
-
-/* 变量列表样式 */
-.variable-list {
- min-width: 200px;
- padding: 4px;
-}
-
-.variable-item {
- border-radius: 4px;
- padding: 0px 16px;
- transition: all 0.3s ease;
- min-height: 40px;
-}
-
-.variable-item:hover {
- background-color: var(--q-primary-opacity-10);
-}
-
-.variable-label {
- padding: 4px 8px;
- display: flex;
- align-items: center;
- gap: 4px;
-}
-
-.variable-name {
- font-size: 12px;
- font-weight: 500;
-}
-
-.variable-source {
- font-size: 11px;
- opacity: 0.7;
-}
-
-/* 暗色模式适配 */
-.body--dark .variable-item:hover {
- background: rgba(255, 255, 255, 0.1);
-}
-
-.options-item-list {
- min-width: 120px;
- padding: 4px;
-}
-
-.option-item {
- border-radius: 4px;
- padding: 0px 16px;
- transition: all 0.3s ease;
- min-height: 40px;
- font-size: 12px;
- display: flex;
- align-items: center;
-}
-
-.option-item:hover {
- background-color: var(--q-primary-opacity-10);
-}
-
-.option-item-label {
- text-align: center;
- flex: 1;
-}
-
-/* 暗色模式适配 */
-.body--dark .option-item:hover {
- background-color: rgba(255, 255, 255, 0.1);
-}
-
-.empty-variables-tip {
- text-align: center;
- font-size: 13px;
- opacity: 0.9;
- transition: opacity 0.3s ease;
-}
-
-.empty-variables-tip:hover {
- opacity: 1;
-}
-
-/* 多选确认按钮样式 */
-.option-item.text-primary {
- justify-content: center;
- font-weight: 500;
-}
-
-/* 多选项样式 */
-.option-item .q-checkbox {
- margin-right: 4px;
-}
diff --git a/src/components/composer/common/varinput/FileSelector.vue b/src/components/composer/common/varinput/FileSelector.vue
new file mode 100644
index 0000000..eca8635
--- /dev/null
+++ b/src/components/composer/common/varinput/FileSelector.vue
@@ -0,0 +1,39 @@
+
+
+ 选择文件
+
+
+
+
diff --git a/src/components/composer/common/varinput/ItemList.vue b/src/components/composer/common/varinput/ItemList.vue
new file mode 100644
index 0000000..5e53edf
--- /dev/null
+++ b/src/components/composer/common/varinput/ItemList.vue
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+ {{ getItemLabel(item) }}
+
+
+
+
+ 确定 (已选择 {{ selectedItems.length }} 项)
+
+
+
+
+
+
+ {{ getItemLabel(item) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/composer/common/varinput/VariableList.vue b/src/components/composer/common/varinput/VariableList.vue
new file mode 100644
index 0000000..90b2292
--- /dev/null
+++ b/src/components/composer/common/varinput/VariableList.vue
@@ -0,0 +1,150 @@
+
+
+
+
+
+ 选择变量
+
+
+
+
+
+
+
+
+ {{ variable.name }}
+
+
+ 来自: {{ variable.sourceCommand.label }}
+
+
+
+
+
+
+
+
+
+
+
+ 当前命令没有可用变量
+
+
+
点击其他命令卡片右上角的
+
+
按钮添加输出变量
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/composer/common/varinput/WindowSelector.vue b/src/components/composer/common/varinput/WindowSelector.vue
new file mode 100644
index 0000000..89d3d46
--- /dev/null
+++ b/src/components/composer/common/varinput/WindowSelector.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
diff --git a/src/js/composer/commands/windowsCommands.js b/src/js/composer/commands/windowsCommands.js
index 904dfd0..502d176 100644
--- a/src/js/composer/commands/windowsCommands.js
+++ b/src/js/composer/commands/windowsCommands.js
@@ -1,52 +1,5 @@
import { newVarInputVal } from "js/composer/varInputValManager.js";
-const controlClass = [
- // 基础控件
- { value: "Button", label: "按钮 (Button)" },
- { value: "Edit", label: "编辑框 (Edit)" },
- { value: "Static", label: "静态文本 (Static)" },
- { value: "ComboBox", label: "下拉框 (ComboBox)" },
- { value: "ListBox", label: "列表框 (ListBox)" },
- { value: "CheckBox", label: "复选框 (CheckBox)" },
- { value: "RadioButton", label: "单选框 (RadioButton)" },
-
- // 常见对话框控件
- { value: "SysListView32", label: "列表视图 (SysListView32)" },
- { value: "SysTreeView32", label: "树形视图 (SysTreeView32)" },
- { value: "SysTabControl32", label: "选项卡 (SysTabControl32)" },
- { value: "msctls_progress32", label: "进度条 (msctls_progress32)" },
- { value: "msctls_trackbar32", label: "滑块 (msctls_trackbar32)" },
- { value: "msctls_updown32", label: "数字调节器 (msctls_updown32)" },
-
- // 文件对话框相关
- { value: "DirectUIHWND", label: "文件浏览器 (DirectUIHWND)" },
- { value: "ToolbarWindow32", label: "工具栏 (ToolbarWindow32)" },
- { value: "ComboBoxEx32", label: "扩展下拉框 (ComboBoxEx32)" },
-
- // 常见应用程序控件
- { value: "RICHEDIT50W", label: "富文本编辑框 (RICHEDIT50W)" },
- { value: "Scintilla", label: "代码编辑器 (Scintilla)" },
- { value: "WebView2", label: "Edge浏览器 (WebView2)" },
- {
- value: "Chrome_RenderWidgetHostHWND",
- label: "Chrome渲染 (Chrome_RenderWidgetHostHWND)",
- },
-
- // 系统控件
- { value: "Shell_TrayWnd", label: "任务栏 (Shell_TrayWnd)" },
- { value: "TrayNotifyWnd", label: "通知区域 (TrayNotifyWnd)" },
- { value: "ReBarWindow32", label: "工具条容器 (ReBarWindow32)" },
- { value: "TaskListThumbnailWnd", label: "任务预览 (TaskListThumbnailWnd)" },
-
- // 通用容器
- { value: "Window", label: "窗口 (Window)" },
- { value: "Dialog", label: "对话框 (Dialog)" },
- { value: "#32770", label: "标准对话框 (#32770)" },
- { value: "MDIClient", label: "MDI客户区 (MDIClient)" },
- { value: "ScrollBar", label: "滚动条 (ScrollBar)" },
- { value: "GroupBox", label: "分组框 (GroupBox)" },
-];
-
const sendKeys = [
// 特殊按键
{ value: "{ENTER}", label: "回车键 (Enter)" },
@@ -174,6 +127,16 @@ const searchWindowConfig = [
icon: "title",
width: 9,
placeholder: "标题、类名支持模糊匹配,选择活动窗口无需输入",
+ options: {
+ window: {
+ props: [
+ { label: "标题", value: "title" },
+ { label: "类名", value: "class" },
+ { label: "句柄", value: "handle" },
+ { label: "进程名", value: "processName" },
+ ],
+ },
+ },
},
];
@@ -185,6 +148,11 @@ const windowHandleConfig = [
width: 12,
placeholder: "可从搜索/选择窗口获取,留空则使用当前活动窗口",
defaultValue: newVarInputVal("str", ""),
+ options: {
+ window: {
+ props: "handle",
+ },
+ },
},
];
@@ -207,6 +175,15 @@ const searchElementConfig = [
label: "查找值",
component: "VariableInput",
icon: "account_tree",
+ options: {
+ window: {
+ props: [
+ { label: "XPath", value: "element.xpath" },
+ { label: "AutomationId", value: "element.automationId" },
+ { label: "Name", value: "element.name" },
+ ],
+ },
+ },
width: 8,
placeholder: "XPath: /Pane[3]/Edit[2], 组合条件: name=按钮&type=Button",
},
@@ -656,7 +633,9 @@ export const windowsCommands = {
component: "VariableInput",
icon: "filter_alt",
options: {
- items: controlClass,
+ window: {
+ props: "element.type",
+ },
},
width: 8,
placeholder: "可选,输入要过滤的控件类型或文本",
@@ -698,7 +677,9 @@ export const windowsCommands = {
component: "VariableInput",
icon: "class",
options: {
- items: controlClass,
+ window: {
+ props: "element.type",
+ },
},
width: 6,
placeholder: "可选,和文本至少输入一个",
@@ -707,6 +688,11 @@ export const windowsCommands = {
label: "控件文本",
component: "VariableInput",
icon: "text_fields",
+ options: {
+ window: {
+ props: "element.name",
+ },
+ },
width: 6,
placeholder: "可选,和控件类型至少输入一个",
},
@@ -750,7 +736,9 @@ export const windowsCommands = {
label: "目标控件",
component: "VariableInput",
options: {
- items: controlClass,
+ window: {
+ props: "element.type",
+ },
},
icon: "class",
width: 8,
@@ -793,7 +781,9 @@ export const windowsCommands = {
label: "目标控件",
component: "VariableInput",
options: {
- items: controlClass,
+ window: {
+ props: "element.type",
+ },
},
icon: "class",
width: 8,