This commit is contained in:
670788339
2025-11-03 19:10:51 +08:00
parent 5f42a95f47
commit 44ccf8db6d

View File

@@ -27,10 +27,10 @@
/>
</el-select>
<!-- 添加标签计数显示 -->
</div>
<div class="tag-count">
{{ selectedTags.length }}/5
</div>
</div>
</template>
<script>
@@ -300,7 +300,6 @@ export default {
<style scoped>
.tag-container {
position: relative;
padding-right: 50px;
}
.tag-preview {
margin-top: 8px;
@@ -312,54 +311,13 @@ export default {
.tag-count {
position: absolute;
right: 8px;
right: 10px;
top: 50%;
transform: translateY(-50%);
font-size: 12px;
color: #909399;
color: #999;
background: white;
padding: 2px 6px;
border-radius: 3px;
padding: 0 5px;
pointer-events: none;
z-index: 10;
/* 添加边框和阴影使其更清晰 */
border: 1px solid #e4e7ed;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
/* 最小宽度确保数字对齐 */
min-width: 35px;
text-align: center;
font-weight: 500;
}
/* 通过调整el-select的样式来避免遮挡 */
.tag-container ::v-deep .el-select {
width: 100%;
}
.tag-container ::v-deep .el-select .el-input__inner {
padding-right: 60px !important;
}
.tag-container ::v-deep .el-select__tags {
max-width: calc(100% - 50px);
padding-right: 0 !important;
}
.tag-container ::v-deep .el-select .el-input__suffix {
right: 40px;
}
.tag-container ::v-deep .el-select .el-input__suffix-inner {
margin-right: 0;
}
.tag-preview {
margin-top: 8px;
}
.el-tag {
margin-right: 6px;
margin-bottom: 6px;
}
</style>