fix(data-process): 限制结果提示浮层尺寸
This commit is contained in:
@@ -48,6 +48,8 @@ assert.match(detailSource, /usePolling\(refreshRuntime,\s*3000/, '运行中任
|
|||||||
assert.match(detailSource, /:data="results"/, '结果表格未绑定服务端结果数据')
|
assert.match(detailSource, /:data="results"/, '结果表格未绑定服务端结果数据')
|
||||||
assert.match(detailSource, /v-model="keyword"/, '结果明细缺少搜索能力')
|
assert.match(detailSource, /v-model="keyword"/, '结果明细缺少搜索能力')
|
||||||
assert.match(detailSource, /v-model="statusFilter"/, '结果明细缺少状态筛选')
|
assert.match(detailSource, /v-model="statusFilter"/, '结果明细缺少状态筛选')
|
||||||
|
assert.match(detailSource, /:tooltip-options="resultCellTooltipOptions"/, '结果明细没有配置受控的长文本提示')
|
||||||
|
assert.match(detailSource, /\.data-process-result-tooltip[\s\S]*?max-width:\s*min\(520px,\s*calc\(100vw - 32px\)\)/, '结果明细长文本提示没有限制最大宽度')
|
||||||
assert.match(detailSource, /updateDataProcessResult\(taskId\.value,[\s\S]*?expected_updated_at:/, '结果编辑没有携带并发版本时间')
|
assert.match(detailSource, /updateDataProcessResult\(taskId\.value,[\s\S]*?expected_updated_at:/, '结果编辑没有携带并发版本时间')
|
||||||
assert.match(detailSource, /restoreDataProcessResult\(taskId\.value,\s*result\.id\)/, '结果恢复没有调用真实 API')
|
assert.match(detailSource, /restoreDataProcessResult\(taskId\.value,\s*result\.id\)/, '结果恢复没有调用真实 API')
|
||||||
assert.match(detailSource, /publishDataProcess\(taskId\.value,/, '发布数据集没有调用真实 API')
|
assert.match(detailSource, /publishDataProcess\(taskId\.value,/, '发布数据集没有调用真实 API')
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ const restoringResultId = ref<string | number | null>(null)
|
|||||||
const publishDialogVisible = ref(false)
|
const publishDialogVisible = ref(false)
|
||||||
const publishing = ref(false)
|
const publishing = ref(false)
|
||||||
const configExpanded = ref(false)
|
const configExpanded = ref(false)
|
||||||
|
const resultCellTooltipOptions = {
|
||||||
|
popperClass: 'data-process-result-tooltip',
|
||||||
|
placement: 'top',
|
||||||
|
showAfter: 300,
|
||||||
|
} as const
|
||||||
let resultFilterTimer: ReturnType<typeof setTimeout> | null = null
|
let resultFilterTimer: ReturnType<typeof setTimeout> | null = null
|
||||||
|
|
||||||
const editForm = reactive({ instruction: '', input: '', output: '' })
|
const editForm = reactive({ instruction: '', input: '', output: '' })
|
||||||
@@ -656,7 +661,13 @@ onBeforeUnmount(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table v-if="results.length" :data="results" row-key="id" table-layout="fixed">
|
<el-table
|
||||||
|
v-if="results.length"
|
||||||
|
:data="results"
|
||||||
|
:tooltip-options="resultCellTooltipOptions"
|
||||||
|
row-key="id"
|
||||||
|
table-layout="fixed"
|
||||||
|
>
|
||||||
<el-table-column type="index" label="#" width="56" align="center" />
|
<el-table-column type="index" label="#" width="56" align="center" />
|
||||||
<el-table-column label="指令" min-width="190" show-overflow-tooltip prop="instruction" />
|
<el-table-column label="指令" min-width="190" show-overflow-tooltip prop="instruction" />
|
||||||
<el-table-column label="输入" min-width="160" show-overflow-tooltip prop="input" />
|
<el-table-column label="输入" min-width="160" show-overflow-tooltip prop="input" />
|
||||||
@@ -858,6 +869,17 @@ onBeforeUnmount(() => {
|
|||||||
.result-filters :deep(.el-select) { width: 120px; }
|
.result-filters :deep(.el-select) { width: 120px; }
|
||||||
.result-section :deep(.el-table) { border-radius: 0; }
|
.result-section :deep(.el-table) { border-radius: 0; }
|
||||||
|
|
||||||
|
:global(.data-process-result-tooltip) {
|
||||||
|
box-sizing: border-box;
|
||||||
|
max-width: min(520px, calc(100vw - 32px));
|
||||||
|
max-height: 240px;
|
||||||
|
overflow-y: auto;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
word-break: break-word;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
.result-empty, .not-found-state {
|
.result-empty, .not-found-state {
|
||||||
min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8;
|
min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8;
|
||||||
> i { margin-bottom: 12px; color: var(--el-color-primary-light-5); font-size: 30px; }
|
> i { margin-bottom: 12px; color: var(--el-color-primary-light-5); font-size: 30px; }
|
||||||
|
|||||||
Reference in New Issue
Block a user