android-midscene-automation 1.1.4 → 1.1.6
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.
- package/CHANGELOG.md +11 -0
- package/README.md +11 -0
- package/artemis-main/apps/admin_console/server.py +33 -0
- package/package.json +1 -1
- package/server/appium-recorder/ai-recognition.ts +9 -0
- package/server/appium-recorder/appium-runner.ts +9 -1
- package/src/appium-recorder/components/AiRecognitionSettings.vue +141 -84
- package/src/appium-recorder/components/ComponentTree.vue +72 -10
- package/src/appium-recorder/components/FlowCanvas.vue +39 -1
- package/src/appium-recorder/components/FlowNodeCard.vue +11 -1
- package/src/appium-recorder/components/FlowStepEditor.vue +114 -85
- package/src/appium-recorder/components/LoopSettings.vue +12 -10
- package/src/appium-recorder/components/NestedConditionBranches.vue +5 -1
- package/src/appium-recorder/components/NodeDetail.vue +129 -52
- package/src/appium-recorder/components/RecordedSteps.vue +12 -0
- package/src/appium-recorder/components/TextClickSettings.vue +11 -11
- package/src/appium-recorder/components/VariableExtractionSettings.vue +6 -4
- package/src/appium-recorder/flow-graph.ts +9 -3
- package/src/components/config/AiDeduplicationSettings.vue +0 -1
- package/src/components/config/MidsceneConfigPanel.vue +12 -2
- package/src/style.css +157 -4
|
@@ -11,7 +11,32 @@ const props = defineProps<{
|
|
|
11
11
|
loading?: boolean;
|
|
12
12
|
}>();
|
|
13
13
|
const detailsVisible = ref(false);
|
|
14
|
-
const
|
|
14
|
+
const locatorItems = computed(() => {
|
|
15
|
+
const node = props.node;
|
|
16
|
+
if (!node) return [];
|
|
17
|
+
const available = nodeLocators(node).filter(locator => Boolean(locator.value));
|
|
18
|
+
const preferredNames: Partial<Record<AppiumNode['selector']['strategy'], string>> = {
|
|
19
|
+
id: 'Resource ID',
|
|
20
|
+
accessibilityId: 'Accessibility ID',
|
|
21
|
+
xpath: 'XPath',
|
|
22
|
+
androidUiAutomator: 'UiAutomator',
|
|
23
|
+
};
|
|
24
|
+
const preferredName = preferredNames[node.selector.strategy];
|
|
25
|
+
const preferredIndex = Math.max(0, available.findIndex(locator => locator.name === preferredName));
|
|
26
|
+
const descriptions: Record<string, string> = {
|
|
27
|
+
'Resource ID': '通常最稳定,页面文案变化时也可继续定位',
|
|
28
|
+
'Accessibility ID': '使用 content-desc 定位,适合无 Resource ID 的组件',
|
|
29
|
+
XPath: '依赖组件层级,页面结构变化后可能需要重新获取',
|
|
30
|
+
UiAutomator: 'Android 原生定位表达式,可组合组件属性',
|
|
31
|
+
};
|
|
32
|
+
return available
|
|
33
|
+
.map((locator, index) => ({
|
|
34
|
+
...locator,
|
|
35
|
+
description: descriptions[locator.name] || '',
|
|
36
|
+
recommended: index === preferredIndex,
|
|
37
|
+
}))
|
|
38
|
+
.sort((left, right) => Number(right.recommended) - Number(left.recommended));
|
|
39
|
+
});
|
|
15
40
|
async function copyLocator(value: string) {
|
|
16
41
|
if (!value) return;
|
|
17
42
|
try { await navigator.clipboard.writeText(value); ElMessage.success('定位内容已复制'); }
|
|
@@ -33,53 +58,77 @@ async function copyLocator(value: string) {
|
|
|
33
58
|
<span v-else class="appium-node-summary__empty">请选择组件</span>
|
|
34
59
|
<el-button size="small" type="primary" :icon="View" :disabled="!node" @click="detailsVisible = true">详情</el-button>
|
|
35
60
|
</div>
|
|
36
|
-
<el-drawer v-model="detailsVisible" title="组件详情" size="
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
61
|
+
<el-drawer v-model="detailsVisible" title="组件详情" size="560px" class="appium-node-detail-drawer" append-to-body destroy-on-close>
|
|
62
|
+
<template v-if="node">
|
|
63
|
+
<div class="appium-node-detail__content">
|
|
64
|
+
<section class="appium-node-detail__summary">
|
|
65
|
+
<div>
|
|
66
|
+
<span>当前组件</span>
|
|
67
|
+
<strong>{{ node.label }}</strong>
|
|
68
|
+
<code>{{ node.className || '未知组件类型' }}</code>
|
|
69
|
+
</div>
|
|
70
|
+
<div class="appium-node-detail__tags">
|
|
71
|
+
<el-tag :type="node.enabled ? 'success' : 'info'" size="small">{{ node.enabled ? '可用' : '不可用' }}</el-tag>
|
|
72
|
+
<el-tag :type="node.clickable ? 'primary' : 'info'" size="small">{{ node.clickable ? '可点击' : '不可点击' }}</el-tag>
|
|
73
|
+
<el-tag v-if="node.selector.matchCount" :type="node.selector.matchCount > 1 ? 'warning' : 'success'" size="small">{{ node.selector.matchCount > 1 ? `定位重复 ${node.selector.matchCount}` : '定位唯一' }}</el-tag>
|
|
74
|
+
</div>
|
|
75
|
+
</section>
|
|
76
|
+
|
|
77
|
+
<section class="appium-node-detail__panel appium-node-detail__panel--locators">
|
|
78
|
+
<div class="appium-node-detail__heading">
|
|
79
|
+
<strong>定位方式</strong>
|
|
80
|
+
<span>已按当前脚本使用优先级排列,未提供的定位属性自动隐藏</span>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="appium-node-locators">
|
|
83
|
+
<article v-for="locator in locatorItems" :key="locator.name" class="appium-node-locator-card" :class="{ 'is-recommended': locator.recommended }">
|
|
84
|
+
<div class="appium-node-locator-card__header">
|
|
85
|
+
<el-tooltip :content="locator.description" placement="top" :show-after="300">
|
|
86
|
+
<span class="appium-node-locator-label"><strong>{{ locator.name }}</strong><small v-if="locator.attribute">{{ locator.attribute }}</small></span>
|
|
87
|
+
</el-tooltip>
|
|
88
|
+
<el-tag v-if="locator.recommended" type="primary" size="small">当前使用</el-tag>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="appium-node-locator-value">
|
|
91
|
+
<code>{{ locator.value }}</code>
|
|
92
|
+
<el-tooltip :content="`复制 ${locator.name}`" placement="top" :show-after="200">
|
|
93
|
+
<el-button class="appium-node-locator-copy" text size="small" :icon="CopyDocument" :aria-label="`复制 ${locator.name}`" @click="copyLocator(locator.value)" />
|
|
94
|
+
</el-tooltip>
|
|
95
|
+
</div>
|
|
96
|
+
<small v-if="locator.warning" class="appium-node-locator-warning">{{ locator.warning }}</small>
|
|
97
|
+
</article>
|
|
98
|
+
<el-empty v-if="!locatorItems.length" :image-size="48" description="当前组件没有可用定位信息" />
|
|
99
|
+
</div>
|
|
100
|
+
</section>
|
|
101
|
+
|
|
102
|
+
<section class="appium-node-detail__panel">
|
|
103
|
+
<div class="appium-node-detail__heading"><strong>组件属性</strong><span>当前组件树快照中的原始信息</span></div>
|
|
104
|
+
<el-descriptions class="appium-node-properties" :column="1" border size="small">
|
|
105
|
+
<el-descriptions-item label="text">{{ node.text || '-' }}</el-descriptions-item>
|
|
106
|
+
<el-descriptions-item label="content-desc">{{ node.contentDesc || '-' }}</el-descriptions-item>
|
|
107
|
+
<el-descriptions-item label="resource-id">{{ node.resourceId || '-' }}</el-descriptions-item>
|
|
108
|
+
<el-descriptions-item label="class">{{ node.className || '-' }}</el-descriptions-item>
|
|
109
|
+
<el-descriptions-item label="package">{{ node.packageName || '-' }}</el-descriptions-item>
|
|
110
|
+
<el-descriptions-item label="enabled">{{ String(node.enabled) }}</el-descriptions-item>
|
|
111
|
+
<el-descriptions-item label="clickable">{{ String(node.clickable) }}</el-descriptions-item>
|
|
112
|
+
<el-descriptions-item v-if="node.checkable !== undefined" label="checkable">{{ String(node.checkable) }}</el-descriptions-item>
|
|
113
|
+
<el-descriptions-item v-if="node.checkable" label="checked">{{ node.checked === undefined ? '-' : String(node.checked) }}</el-descriptions-item>
|
|
114
|
+
<el-descriptions-item label="当前 Activity">{{ currentActivity || '-' }}</el-descriptions-item>
|
|
115
|
+
<el-descriptions-item label="selector">
|
|
116
|
+
<code>{{ node.selector.strategy }} {{ node.selector.value || '' }}</code>
|
|
117
|
+
</el-descriptions-item>
|
|
118
|
+
<el-descriptions-item label="推荐定位">
|
|
119
|
+
<span v-if="node.contextSelector">父级 {{ node.contextSelector.strategy }} {{ node.contextSelector.value || '' }} + 子级 {{ node.selector.strategy }} {{ node.selector.value || '' }}</span>
|
|
120
|
+
<span v-else>{{ node.selector.unique ? '当前 selector 唯一' : '使用当前 selector,定位失败时使用坐标兜底' }}</span>
|
|
121
|
+
</el-descriptions-item>
|
|
122
|
+
<el-descriptions-item label="bounds">
|
|
123
|
+
<code v-if="node.bounds">[{{ node.bounds.left }},{{ node.bounds.top }}][{{ node.bounds.right }},{{ node.bounds.bottom }}]</code>
|
|
124
|
+
<span v-else>-</span>
|
|
125
|
+
</el-descriptions-item>
|
|
126
|
+
</el-descriptions>
|
|
127
|
+
</section>
|
|
128
|
+
</div>
|
|
129
|
+
</template>
|
|
130
|
+
<el-empty v-else description="请选择组件" />
|
|
131
|
+
<template #footer><el-button type="primary" @click="detailsVisible = false">关闭</el-button></template>
|
|
83
132
|
</el-drawer>
|
|
84
133
|
|
|
85
134
|
</div>
|
|
@@ -90,13 +139,41 @@ async function copyLocator(value: string) {
|
|
|
90
139
|
.appium-node-summary__text { display: grid; gap: 2px; min-width: 0; font-size: 12px; }
|
|
91
140
|
.appium-node-summary__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
|
|
92
141
|
.appium-node-summary__text span, .appium-node-summary__empty { color: var(--el-text-color-secondary); font-size: 12px; }
|
|
142
|
+
:global(.appium-node-detail-drawer.el-drawer) { max-width: calc(100vw - 24px); border-left: 1px solid var(--ui-border); background: var(--ui-bg); box-shadow: -18px 0 48px rgb(15 23 42 / 18%); }
|
|
143
|
+
:global(.appium-node-detail-drawer .el-drawer__header) { min-height: 56px; margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--ui-border); background: linear-gradient(180deg, #fff, #f8fafc); color: var(--ui-text); }
|
|
144
|
+
:global(.appium-node-detail-drawer .el-drawer__title) { font-size: 16px; font-weight: 650; }
|
|
145
|
+
:global(.appium-node-detail-drawer .el-drawer__body) { padding: 20px; background: var(--ui-bg); }
|
|
146
|
+
:global(.appium-node-detail-drawer .el-drawer__footer) { padding: 14px 20px; border-top: 1px solid var(--ui-border); background: #f8fafc; }
|
|
147
|
+
.appium-node-detail__content { display: grid; gap: 16px; }
|
|
148
|
+
.appium-node-detail__summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px; border: 1px solid #dbeafe; border-radius: var(--ui-radius); background: linear-gradient(135deg, #f8fbff, #eff6ff); box-shadow: var(--ui-shadow-card); }
|
|
149
|
+
.appium-node-detail__summary > div:first-child { display: grid; min-width: 0; gap: 5px; }
|
|
150
|
+
.appium-node-detail__summary span { color: var(--ui-text-muted); font-size: 12px; }
|
|
151
|
+
.appium-node-detail__summary strong { color: var(--ui-text); font-size: 16px; overflow-wrap: anywhere; }
|
|
152
|
+
.appium-node-detail__summary code { color: var(--ui-text-secondary); font-size: 12px; overflow-wrap: anywhere; }
|
|
153
|
+
.appium-node-detail__tags { display: flex; flex: none; justify-content: flex-end; gap: 6px; flex-wrap: wrap; max-width: 220px; }
|
|
154
|
+
.appium-node-detail__panel { padding: 16px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface); box-shadow: var(--ui-shadow-card); }
|
|
155
|
+
.appium-node-detail__panel--locators { padding: 12px; }
|
|
156
|
+
.appium-node-detail__panel--locators .appium-node-detail__heading { margin-bottom: 8px; }
|
|
157
|
+
.appium-node-detail__heading { display: grid; gap: 4px; margin-bottom: 12px; }
|
|
158
|
+
.appium-node-detail__heading strong { color: var(--ui-text); font-size: 14px; }
|
|
159
|
+
.appium-node-detail__heading span { color: var(--ui-text-muted); font-size: 12px; }
|
|
160
|
+
.appium-node-locators { display: grid; gap: 7px; }
|
|
161
|
+
.appium-node-locator-card { display: grid; gap: 6px; min-width: 0; padding: 9px 10px; border: 1px solid var(--ui-border); border-radius: 9px; background: #fbfcfe; box-shadow: 0 2px 6px rgb(15 23 42 / 5%); }
|
|
162
|
+
.appium-node-locator-card.is-recommended { border-color: #bfdbfe; background: linear-gradient(135deg, #f8fbff, #eff6ff); box-shadow: 0 0 0 2px rgb(26 115 232 / 8%), 0 4px 10px rgb(26 115 232 / 8%); }
|
|
163
|
+
.appium-node-locator-card__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
164
|
+
.appium-node-locator-value { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 6px; }
|
|
165
|
+
.appium-node-locator-value code { min-height: 26px; padding: 5px 8px; border: 1px solid rgb(203 213 225 / 65%); border-radius: 7px; background: #f1f5f9; color: var(--ui-text-secondary); font-size: 11px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
|
|
93
166
|
:deep(.el-descriptions__content) { overflow-wrap: anywhere; word-break: break-word; }
|
|
94
167
|
.appium-node-properties :deep(.el-descriptions__table) { table-layout: fixed; width: 100%; }
|
|
95
168
|
.appium-node-properties :deep(.el-descriptions__label) { width: 118px; overflow-wrap: anywhere; }
|
|
96
|
-
.appium-node-locator-label { display:
|
|
169
|
+
.appium-node-locator-label { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ui-text); cursor: help; }
|
|
97
170
|
.appium-node-locator-label small { font-weight: 400; color: var(--el-text-color-secondary); }
|
|
98
|
-
.appium-node-locator {
|
|
99
|
-
.appium-node-locator code { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
|
|
100
|
-
.appium-node-locator .appium-node-locator-copy { flex: none; width: 26px; height: 26px; min-height: 26px; padding: 0; }
|
|
171
|
+
.appium-node-locator-copy { width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; margin: 0; }
|
|
101
172
|
.appium-node-locator-warning { display: block; margin-top: 4px; color: var(--el-color-warning); }
|
|
173
|
+
@media (max-width: 520px) {
|
|
174
|
+
:global(.appium-node-detail-drawer .el-drawer__body) { padding: 14px; }
|
|
175
|
+
.appium-node-detail__summary { display: grid; padding: 14px; }
|
|
176
|
+
.appium-node-detail__tags { justify-content: flex-start; max-width: none; }
|
|
177
|
+
.appium-node-detail__panel { padding: 12px; }
|
|
178
|
+
}
|
|
102
179
|
</style>
|
|
@@ -247,6 +247,10 @@ function resetMainFlowPosition() {
|
|
|
247
247
|
mainResetViewToken.value += 1;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
function resetDialogFlowPosition() {
|
|
251
|
+
dialogResetViewToken.value += 1;
|
|
252
|
+
}
|
|
253
|
+
|
|
250
254
|
watch(flowDialogVisible, (visible) => {
|
|
251
255
|
if (!visible) return;
|
|
252
256
|
void nextTick(() => {
|
|
@@ -396,6 +400,14 @@ function updateStep(index: number, step: AppiumRecordedStep) {
|
|
|
396
400
|
<el-tooltip v-if="!copyMode" content="批量删除" placement="top" :show-after="200"><span class="flow-toolbar-icon">
|
|
397
401
|
<el-button aria-label="批量删除" size="small" :icon="Delete" :disabled="!steps.length || mergeDisabled || removeDisabled" @click="startDeleteMode" />
|
|
398
402
|
</span></el-tooltip>
|
|
403
|
+
<el-tooltip content="还原位置" placement="top" :show-after="200"><span class="flow-toolbar-icon">
|
|
404
|
+
<el-button
|
|
405
|
+
aria-label="还原位置"
|
|
406
|
+
size="small"
|
|
407
|
+
:icon="Aim"
|
|
408
|
+
@click="resetDialogFlowPosition"
|
|
409
|
+
/>
|
|
410
|
+
</span></el-tooltip>
|
|
399
411
|
</div>
|
|
400
412
|
<FlowCanvas
|
|
401
413
|
id="appium-flow-dialog"
|
|
@@ -5,15 +5,15 @@ const emit = defineEmits<{ update: [patch: Partial<AppiumRecordedStep>] }>();
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<template>
|
|
8
|
-
<
|
|
9
|
-
<el-
|
|
10
|
-
@update:model-value="emit('update', { value: String($event) })" />
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</el-
|
|
18
|
-
</
|
|
8
|
+
<div class="appium-flow-editor__grid">
|
|
9
|
+
<el-form-item label="点击文字" required>
|
|
10
|
+
<el-input :model-value="step.value || ''" :disabled="disabled" maxlength="1000" aria-label="点击文字" @update:model-value="emit('update', { value: String($event) })" />
|
|
11
|
+
</el-form-item>
|
|
12
|
+
<el-form-item label="文本匹配方式">
|
|
13
|
+
<el-select :model-value="step.flow?.textMatch || 'contains'" :disabled="disabled" @update:model-value="emit('update', { flow: { ...props.step.flow, textMatch: $event } })">
|
|
14
|
+
<el-option label="精准匹配(完全一致)" value="exact" />
|
|
15
|
+
<el-option label="模糊匹配(包含)" value="contains" />
|
|
16
|
+
</el-select>
|
|
17
|
+
</el-form-item>
|
|
18
|
+
</div>
|
|
19
19
|
</template>
|
|
@@ -9,9 +9,11 @@ function update(patch: Partial<VariableExtraction>) {
|
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
<el-
|
|
15
|
-
|
|
12
|
+
<div class="appium-flow-editor__grid">
|
|
13
|
+
<el-form-item label="保存到脚本变量"><el-input :model-value="step.extractVariable?.name || ''" :disabled="disabled" aria-label="提取变量名" @update:model-value="update({ name: String($event) })" /></el-form-item>
|
|
14
|
+
<el-form-item label="组件属性"><el-select :model-value="step.extractVariable?.attribute || 'text'" :disabled="disabled" filterable allow-create default-first-option aria-label="提取组件属性" @update:model-value="update({ attribute: String($event) })">
|
|
15
|
+
<el-option v-for="name in ['text', 'content-desc', 'checked', 'selected', 'enabled', 'resource-id', 'class']" :key="name" :label="name" :value="name" />
|
|
16
|
+
</el-select></el-form-item>
|
|
17
|
+
</div>
|
|
16
18
|
<el-form-item label="敏感变量"><el-checkbox :model-value="step.extractVariable?.sensitive || sensitiveVariableName(step.extractVariable?.name || '')" :disabled="disabled || sensitiveVariableName(step.extractVariable?.name || '')" @update:model-value="update({ sensitive: Boolean($event) })" /></el-form-item>
|
|
17
19
|
</template>
|
|
@@ -277,9 +277,12 @@ function estimateTextLines(text: string | undefined, charsPerLine: number) {
|
|
|
277
277
|
), 0);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
function estimateStepNodeHeight(label: { title: string; meta: string; note?: string }) {
|
|
280
|
+
function estimateStepNodeHeight(label: { title: string; meta: string; note?: string }, maxMetaLines?: number) {
|
|
281
281
|
const titleLines = estimateTextLines(label.title, 20);
|
|
282
|
-
const
|
|
282
|
+
const estimatedMetaLines = estimateTextLines(label.meta, 24);
|
|
283
|
+
const metaLines = maxMetaLines == null
|
|
284
|
+
? estimatedMetaLines
|
|
285
|
+
: Math.min(estimatedMetaLines, maxMetaLines);
|
|
283
286
|
const noteLines = estimateTextLines(label.note, 24);
|
|
284
287
|
const textHeight = titleLines * 19 + metaLines * 17 + noteLines * 17;
|
|
285
288
|
return Math.max(FLOW_STEP_NODE_HEIGHT, 34 + textHeight);
|
|
@@ -424,7 +427,10 @@ export function buildFlowGraph(
|
|
|
424
427
|
const label = options.labelStep(item.step);
|
|
425
428
|
// 字数估算仅用于首次布局,不强制卡片高度;实际换行由浏览器决定。
|
|
426
429
|
const cardMinHeight = FLOW_STEP_NODE_HEIGHT;
|
|
427
|
-
const estimatedCardHeight = estimateStepNodeHeight(
|
|
430
|
+
const estimatedCardHeight = estimateStepNodeHeight(
|
|
431
|
+
label,
|
|
432
|
+
item.step.type === 'aiRecognition' ? 3 : undefined,
|
|
433
|
+
);
|
|
428
434
|
const estimatedNodeHeight = options.expandedStepIndex === item.index
|
|
429
435
|
? estimatedCardHeight + FLOW_EXPANDED_NODE_HEIGHT
|
|
430
436
|
: estimatedCardHeight;
|
|
@@ -56,5 +56,4 @@ function patch(value: Partial<AiDeduplicationConfig>) {
|
|
|
56
56
|
.ai-dedup-explanation { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ui-border); color: var(--el-text-color-regular); font-size: 13px; line-height: 1.7; }
|
|
57
57
|
.ai-dedup-explanation h4 { margin: 0 0 8px; color: var(--el-text-color-primary); font-size: 13px; }
|
|
58
58
|
.ai-dedup-explanation p { margin: 6px 0; }
|
|
59
|
-
.ai-dedup-settings :deep(.el-radio-group) { gap: 4px 0; }
|
|
60
59
|
</style>
|
|
@@ -118,7 +118,12 @@ const openModelConfigGuide = () => {
|
|
|
118
118
|
/>
|
|
119
119
|
</el-form-item>
|
|
120
120
|
<el-form-item label="API Key">
|
|
121
|
-
<el-input
|
|
121
|
+
<el-input
|
|
122
|
+
v-model="configForm.midscene.model.apiKey"
|
|
123
|
+
type="password"
|
|
124
|
+
placeholder="已保存的 Key 显示为掩码,可输入新 Key 替换"
|
|
125
|
+
show-password
|
|
126
|
+
/>
|
|
122
127
|
</el-form-item>
|
|
123
128
|
</template>
|
|
124
129
|
<template v-else>
|
|
@@ -181,7 +186,12 @@ const openModelConfigGuide = () => {
|
|
|
181
186
|
<el-input v-model="configForm.scriptOptimizer.model.baseUrl" />
|
|
182
187
|
</el-form-item>
|
|
183
188
|
<el-form-item label="API Key">
|
|
184
|
-
<el-input
|
|
189
|
+
<el-input
|
|
190
|
+
v-model="configForm.scriptOptimizer.model.apiKey"
|
|
191
|
+
type="password"
|
|
192
|
+
placeholder="已保存的 Key 显示为掩码,可输入新 Key 替换"
|
|
193
|
+
show-password
|
|
194
|
+
/>
|
|
185
195
|
</el-form-item>
|
|
186
196
|
<el-form-item label="Model Name">
|
|
187
197
|
<el-input v-model="configForm.scriptOptimizer.model.name" />
|
package/src/style.css
CHANGED
|
@@ -834,6 +834,14 @@ select {
|
|
|
834
834
|
overflow-wrap: anywhere;
|
|
835
835
|
}
|
|
836
836
|
|
|
837
|
+
.appium-flow-node__meta--clamped {
|
|
838
|
+
display: -webkit-box;
|
|
839
|
+
overflow: hidden;
|
|
840
|
+
text-overflow: ellipsis;
|
|
841
|
+
-webkit-box-orient: vertical;
|
|
842
|
+
-webkit-line-clamp: 3;
|
|
843
|
+
}
|
|
844
|
+
|
|
837
845
|
.appium-flow-node__note {
|
|
838
846
|
min-width: 0;
|
|
839
847
|
color: var(--ui-text);
|
|
@@ -1109,11 +1117,11 @@ select {
|
|
|
1109
1117
|
}
|
|
1110
1118
|
|
|
1111
1119
|
.appium-flow-editor__grid--swipe {
|
|
1112
|
-
grid-template-columns: repeat(
|
|
1120
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1113
1121
|
}
|
|
1114
1122
|
|
|
1115
1123
|
.appium-flow-editor__grid--visual {
|
|
1116
|
-
grid-template-columns: repeat(
|
|
1124
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1117
1125
|
}
|
|
1118
1126
|
|
|
1119
1127
|
.appium-swipe-message-box {
|
|
@@ -3296,11 +3304,81 @@ body {
|
|
|
3296
3304
|
}
|
|
3297
3305
|
|
|
3298
3306
|
.el-message-box {
|
|
3307
|
+
--el-messagebox-padding-primary: 0;
|
|
3308
|
+
padding: 0;
|
|
3309
|
+
overflow: hidden;
|
|
3299
3310
|
border: 1px solid var(--ui-border);
|
|
3300
3311
|
border-radius: var(--ui-radius);
|
|
3301
3312
|
box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
|
|
3302
3313
|
}
|
|
3303
3314
|
|
|
3315
|
+
.el-message-box__header {
|
|
3316
|
+
box-sizing: border-box;
|
|
3317
|
+
min-height: 56px;
|
|
3318
|
+
padding: 16px 20px;
|
|
3319
|
+
border-bottom: 1px solid var(--ui-border);
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
.el-message-box__header.show-close {
|
|
3323
|
+
padding-right: 64px;
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
.el-message-box__headerbtn {
|
|
3327
|
+
top: 8px;
|
|
3328
|
+
right: 12px;
|
|
3329
|
+
border-radius: var(--ui-radius-control);
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
.el-message-box__headerbtn:hover {
|
|
3333
|
+
background: #eff6ff;
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
.el-message-box__title {
|
|
3337
|
+
color: var(--ui-text);
|
|
3338
|
+
font-size: 16px;
|
|
3339
|
+
font-weight: 650;
|
|
3340
|
+
line-height: 24px;
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
.el-message-box__content {
|
|
3344
|
+
display: grid;
|
|
3345
|
+
align-content: center;
|
|
3346
|
+
box-sizing: border-box;
|
|
3347
|
+
min-height: 88px;
|
|
3348
|
+
padding: 18px 24px;
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
.el-message-box__container {
|
|
3352
|
+
justify-content: center;
|
|
3353
|
+
width: 100%;
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3356
|
+
.el-message-box__message {
|
|
3357
|
+
text-align: center;
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
.el-message-box__input {
|
|
3361
|
+
width: 100%;
|
|
3362
|
+
padding-top: 14px;
|
|
3363
|
+
}
|
|
3364
|
+
|
|
3365
|
+
.el-message-box__btns {
|
|
3366
|
+
gap: 10px;
|
|
3367
|
+
min-height: 68px;
|
|
3368
|
+
padding: 14px 20px;
|
|
3369
|
+
border-top: 1px solid var(--ui-border);
|
|
3370
|
+
background: #f8fafc;
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
.el-message-box__btns .el-button + .el-button {
|
|
3374
|
+
margin-left: 0;
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
@media (max-width: 520px) {
|
|
3378
|
+
.el-message-box__content { padding: 16px 18px; }
|
|
3379
|
+
.el-message-box__btns { padding: 12px 16px; }
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3304
3382
|
.el-tabs__item {
|
|
3305
3383
|
color: var(--ui-text-secondary);
|
|
3306
3384
|
font-weight: 500;
|
|
@@ -3955,10 +4033,85 @@ button:focus-visible { outline: 2px solid var(--ui-primary); outline-offset: -2p
|
|
|
3955
4033
|
box-shadow: var(--ui-shadow-inset);
|
|
3956
4034
|
}
|
|
3957
4035
|
.layout .subnav__item--active, .layout .trend-tabs button.active,
|
|
3958
|
-
.el-tabs:not(.el-tabs--card):not(.el-tabs--border-card) > .el-tabs__header .el-tabs__item.is-active
|
|
3959
|
-
.el-radio-group .el-radio-button.is-active .el-radio-button__inner {
|
|
4036
|
+
.el-tabs:not(.el-tabs--card):not(.el-tabs--border-card) > .el-tabs__header .el-tabs__item.is-active {
|
|
3960
4037
|
box-shadow: var(--ui-shadow-control);
|
|
3961
4038
|
}
|
|
4039
|
+
|
|
4040
|
+
.el-radio-group:has(.el-radio-button) {
|
|
4041
|
+
display: inline-flex;
|
|
4042
|
+
align-items: stretch;
|
|
4043
|
+
gap: 2px;
|
|
4044
|
+
box-sizing: border-box;
|
|
4045
|
+
width: fit-content;
|
|
4046
|
+
max-width: 100%;
|
|
4047
|
+
padding: 2px;
|
|
4048
|
+
border: 1px solid #dbe3ee;
|
|
4049
|
+
border-radius: 14px;
|
|
4050
|
+
background: linear-gradient(180deg, #fff, #f8fafc);
|
|
4051
|
+
box-shadow: inset 0 1px 0 rgb(255 255 255 / 95%), 0 4px 12px -4px rgb(15 23 42 / 20%);
|
|
4052
|
+
}
|
|
4053
|
+
|
|
4054
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button {
|
|
4055
|
+
flex: 1 1 auto;
|
|
4056
|
+
min-width: 0;
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button__inner {
|
|
4060
|
+
display: flex;
|
|
4061
|
+
align-items: center;
|
|
4062
|
+
justify-content: center;
|
|
4063
|
+
box-sizing: border-box;
|
|
4064
|
+
min-height: 32px;
|
|
4065
|
+
padding: 6px 12px;
|
|
4066
|
+
border: 0 !important;
|
|
4067
|
+
border-radius: 11px !important;
|
|
4068
|
+
background: transparent;
|
|
4069
|
+
box-shadow: none !important;
|
|
4070
|
+
color: var(--ui-text-secondary);
|
|
4071
|
+
font-weight: 500;
|
|
4072
|
+
line-height: 1.25;
|
|
4073
|
+
white-space: normal;
|
|
4074
|
+
text-align: center;
|
|
4075
|
+
transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
|
|
4076
|
+
}
|
|
4077
|
+
|
|
4078
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button:not(.is-active):not(.is-disabled) .el-radio-button__inner:hover {
|
|
4079
|
+
background: #f1f5f9;
|
|
4080
|
+
color: var(--ui-primary);
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4083
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button.is-active .el-radio-button__inner {
|
|
4084
|
+
background: linear-gradient(180deg, #438cf5, #2574e8);
|
|
4085
|
+
box-shadow: inset 0 1px 0 rgb(255 255 255 / 30%), 0 4px 12px rgb(37 116 232 / 34%) !important;
|
|
4086
|
+
color: #fff;
|
|
4087
|
+
font-weight: 600;
|
|
4088
|
+
}
|
|
4089
|
+
|
|
4090
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button.is-active:not(.is-disabled) .el-radio-button__inner:active {
|
|
4091
|
+
box-shadow: inset 0 2px 5px rgb(15 23 42 / 20%) !important;
|
|
4092
|
+
transform: translateY(1px);
|
|
4093
|
+
}
|
|
4094
|
+
|
|
4095
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button.is-disabled .el-radio-button__inner {
|
|
4096
|
+
background: transparent;
|
|
4097
|
+
color: var(--el-disabled-text-color);
|
|
4098
|
+
}
|
|
4099
|
+
|
|
4100
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button.is-active.is-disabled .el-radio-button__inner {
|
|
4101
|
+
background: #dbeafe;
|
|
4102
|
+
color: #64748b;
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button__original-radio:focus-visible + .el-radio-button__inner {
|
|
4106
|
+
outline: 2px solid var(--ui-primary);
|
|
4107
|
+
outline-offset: 1px;
|
|
4108
|
+
}
|
|
4109
|
+
|
|
4110
|
+
.el-radio-group:has(.el-radio-button) .el-radio-button--small .el-radio-button__inner {
|
|
4111
|
+
min-height: 27px;
|
|
4112
|
+
padding: 4px 9px;
|
|
4113
|
+
font-size: 12px;
|
|
4114
|
+
}
|
|
3962
4115
|
.el-dialog, .el-message-box, .el-popper.is-light { box-shadow: var(--ui-shadow-popover); }
|
|
3963
4116
|
.el-dialog__header, .el-message-box__header { background: linear-gradient(180deg, #fff, #f8fafc); }
|
|
3964
4117
|
.el-table {
|