fix: 优化所有批量编辑标签提示展示

This commit is contained in:
xinxin.wu 2024-07-24 11:02:31 +08:00 committed by 刘瑞斌
parent a7fd5d4de5
commit 25a8a43b03
12 changed files with 15 additions and 10 deletions

View File

@ -35,7 +35,11 @@
</template>
</a-input-tag>
</div>
<div v-if="isError" class="ml-[1px] flex justify-start text-[12px] text-[rgb(var(--danger-6))]">
<!-- 为空优先级最高为空则提示外部校验的内容输入回车并且不超过64 -->
<div
v-if="isError && innerModelValue.length"
class="ml-[1px] mr-[4px] flex justify-start text-[12px] text-[rgb(var(--danger-6))]"
>
{{ t('common.tagInputMaxLength', { number: props.maxLength }) }}
</div>
</a-tooltip>

View File

@ -200,4 +200,5 @@ export default {
'common.default': 'Default',
'common.jump': 'Jump',
'common.gotIt': 'Got it',
'common.inputPleaseEnterTags': 'Please enter the update tag enter add, not more than 64 characters',
};

View File

@ -199,4 +199,5 @@ export default {
'common.default': '默认',
'common.jump': '跳转',
'common.gotIt': '知道了',
'common.inputPleaseEnterTags': '请输入更新标签回车添加不得超过64字符',
};

View File

@ -146,7 +146,7 @@
field="values"
:label="t('apiTestManagement.batchUpdate')"
:validate-trigger="['blur', 'input']"
:rules="[{ required: true, message: t('apiTestManagement.valueRequired') }]"
:rules="[{ required: true, message: t('common.inputPleaseEnterTags') }]"
asterisk-position="end"
class="mb-0"
required

View File

@ -196,7 +196,7 @@
field="values"
:label="t('apiTestManagement.batchUpdate')"
:validate-trigger="['blur', 'input']"
:rules="[{ required: true, message: t('apiTestManagement.valueRequired') }]"
:rules="[{ required: true, message: t('common.inputPleaseEnterTags') }]"
asterisk-position="end"
class="mb-0"
required

View File

@ -125,7 +125,7 @@
field="values"
:label="t('apiTestManagement.batchUpdate')"
:validate-trigger="['blur', 'input']"
:rules="[{ required: true, message: t('apiTestManagement.valueRequired') }]"
:rules="[{ required: true, message: t('common.inputPleaseEnterTags') }]"
asterisk-position="end"
class="mb-0"
required

View File

@ -338,7 +338,7 @@
field="values"
:label="t('api_scenario.table.batchUpdate')"
:validate-trigger="['blur', 'input']"
:rules="[{ required: true, message: t('api_scenario.table.valueRequired') }]"
:rules="[{ required: true, message: t('common.inputPleaseEnterTags') }]"
asterisk-position="end"
class="mb-0"
required

View File

@ -57,10 +57,11 @@
asterisk-position="end"
:label="t('bugManagement.batchUpdate.update')"
:validate-trigger="['blur', 'input']"
:rules="[{ required: true, message: t('bugManagement.batchUpdate.required.value') }]"
:rules="[{ required: true, message: t('common.inputPleaseEnterTags') }]"
>
<template v-if="valueMode === 'tags'">
<MsTagsInput v-model:modelValue="form.value" :disabled="!form.attribute"></MsTagsInput>
<div class="text-[12px] leading-[20px] text-[var(--color-text-4)]">{{ t('ms.tagsInput.tagLimitTip') }}</div>
</template>
<template v-else-if="valueMode === 'user_selector'">
<MsUserSelector

View File

@ -35,7 +35,7 @@
:validate-trigger="['blur', 'input']"
:label="t('caseManagement.featureCase.batchUpdate')"
asterisk-position="end"
:rules="[{ required: true, message: t('caseManagement.featureCase.PleaseInputTags') }]"
:rules="[{ required: true, message: t('common.inputPleaseEnterTags') }]"
>
<MsTagsInput v-model:modelValue="form.tags" allow-clear></MsTagsInput>
<div class="text-[12px] leading-[20px] text-[var(--color-text-4)]">{{ t('ms.tagsInput.tagLimitTip') }}</div>

View File

@ -88,7 +88,6 @@ export default {
'caseManagement.featureCase.batchCopy': 'Copy Successfully!',
'caseManagement.featureCase.editSuccess': 'update Successfully',
'caseManagement.featureCase.PleaseSelect': 'Please select',
'caseManagement.featureCase.PleaseInputTags': 'Please enter the update tag to add',
'caseManagement.featureCase.expectedResult': 'Expected Result',
'caseManagement.featureCase.remark': 'Remark',
'caseManagement.featureCase.addAttachment': 'Add attachment',

View File

@ -89,7 +89,6 @@ export default {
'caseManagement.featureCase.batchMoveSuccess': '移动成功',
'caseManagement.featureCase.editSuccess': '更新成功',
'caseManagement.featureCase.PleaseSelect': '请选择',
'caseManagement.featureCase.PleaseInputTags': '请输入更新标签回车添加',
'caseManagement.featureCase.expectedResult': '预期结果',
'caseManagement.featureCase.remark': '备注',
'caseManagement.featureCase.addAttachment': '添加附件',

View File

@ -27,7 +27,7 @@
v-if="form.selectedAttrsId === 'tags'"
field="tags"
:label="t('apiTestManagement.batchUpdate')"
:rules="[{ required: true, message: t('apiTestManagement.valueRequired') }]"
:rules="[{ required: true, message: t('common.inputPleaseEnterTags') }]"
asterisk-position="end"
:validate-trigger="['blur', 'input']"
class="mb-0"