This commit is contained in:
670788339
2025-11-03 19:06:22 +08:00
parent b0bc517936
commit 5f42a95f47

View File

@@ -300,6 +300,7 @@ export default {
<style scoped>
.tag-container {
position: relative;
padding-right: 50px;
}
.tag-preview {
margin-top: 8px;
@@ -309,20 +310,56 @@ export default {
margin-bottom: 6px;
}
/* 优化内部计数器样式 */
.tag-count {
position: absolute;
right: 30px; /* 避开下拉箭头 */
right: 8px;
top: 50%;
transform: translateY(-50%);
font-size: 12px;
color: #999;
background: rgba(255, 255, 255, 0.9);
color: #909399;
background: white;
padding: 2px 6px;
border-radius: 3px;
pointer-events: none;
z-index: 10; /* 确保在最上层 */
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>