CN-1066 feat: 增加知识库格式提示

This commit is contained in:
chenjinsong
2023-07-14 20:32:18 +08:00
parent d640c656fa
commit ee338b247d
2 changed files with 35 additions and 1 deletions

View File

@@ -682,8 +682,9 @@
}
.el-collapse {
width: 655px;
width: 855px;
margin-left: 5px;
padding-right: 200px;
border: none;
.el-collapse-item.upload-collapse {
@@ -721,6 +722,7 @@
.el-collapse-item__wrap {
padding-left: 35px;
border: none;
overflow: visible;
}
.el-collapse-item__content {
position: relative;
@@ -873,6 +875,22 @@
&.imported-table-box--error {
border-color: $--color-danger;
}
.entity-format-tip {
position: absolute;
left: 100%;
padding-left: 10px;
width: 200px;
color: #353636;
div {
display: flex;
}
span {
padding-right: 10px;
color: #909399;
}
}
.imported-table {
padding: 0 12px;
width: 100%;

View File

@@ -94,6 +94,22 @@
}) }}
</div>
<div class="imported-table-box" :class="previewErrorTip ? 'imported-table-box--error' : ''">
<div class="entity-format-tip">
<template v-if="editObject.source === knowledgeBaseType.find(t => t.name === 'ip').value">
<div><span>{{$t('overall.format')}}:</span></div>
<div><span>IPv4</span> x.x.x.x</div>
<div><span>IPv4 CIDR</span> x.x.x.x/n</div>
<div><span>IPv4 Range</span> x.x.x.x-y.y.y.y</div>
<div><span>IPv6</span> x:x:x::x</div>
<div><span>IPv6 CIDR</span> x:x:x::x/n</div>
<div><span>IPv6 Range</span> x:x:x::x-y:y:y::y</div>
</template>
<template v-else-if="editObject.source === knowledgeBaseType.find(t => t.name === 'domain').value">
<div><span>{{$t('overall.format')}}:</span></div>
<div><span>{{$t('entities.format.suffix')}}</span> *example.com</div>
<div><span>{{$t('entities.format.exactly')}}</span> $www.example.com</div>
</template>
</div>
<el-form ref="editForm" :model="editTagForm" :rules="editTagFormRules">
<table class="imported-table" v-if="!importedDataNoData">
<tr>