Skip to content

Commit ab231ca

Browse files
committed
refactor: improve error message display and validation feedback
- Enhanced the error alert in Form.vue to include a fitting content style and text truncation for better readability. - Updated the validation message construction in ConditionBox.vue to format table relationships more clearly, improving user feedback during validation.
1 parent 22eac7a commit ab231ca

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

packages/business/src/views/verification/Form.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,9 +1074,14 @@ provide('ConnectorMap', ConnectorMap)
10741074

10751075
<template v-if="!!errorMessageLevel">
10761076
<el-divider class="mx-4" direction="vertical" />
1077-
<el-alert type="error" show-icon :closable="false" class="w-auto">
1077+
<el-alert
1078+
type="error"
1079+
show-icon
1080+
:closable="false"
1081+
class="w-auto fit-content"
1082+
>
10781083
<template #title>
1079-
<div v-html="jointErrorMessage" />
1084+
<div class="text-truncate" v-html="jointErrorMessage" />
10801085
</template>
10811086
</el-alert>
10821087
</template>

packages/business/src/views/verification/components/ConditionBox.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,12 +1151,13 @@ const validate = async () => {
11511151
message = i18n.t(
11521152
'packages_business_verification_form_index_field_count_is_not_equal',
11531153
)
1154+
const arr = []
11541155
countNotArr.forEach((el, elIndex) => {
11551156
if (elIndex <= SHOW_COUNT) {
1156-
message += `${el.source.table} `
1157-
message += `${el.target.table} `
1157+
arr.push(`${el.source.table} → ${el.target.table} `)
11581158
}
11591159
})
1160+
message += arr.join(', ')
11601161
if (countNotArr.length > SHOW_COUNT) {
11611162
message += `...${countNotArr.length - SHOW_COUNT}`
11621163
}

0 commit comments

Comments
 (0)