From 2070466786c57f89738add4980d9f066fe5d163b Mon Sep 17 00:00:00 2001 From: 670788339 <670788339@qq.com> Date: Tue, 11 Nov 2025 16:38:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=AF=BE=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/courseTag.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/Course/courseTag.vue b/src/components/Course/courseTag.vue index 39003d46..75617834 100644 --- a/src/components/Course/courseTag.vue +++ b/src/components/Course/courseTag.vue @@ -364,7 +364,7 @@ export default { flex-wrap: wrap; align-items: center; } - +/* ::v-deep(.el-tag) { flex: 0 0 calc(50% - 8px); max-width: calc(50% - 8px); @@ -374,6 +374,20 @@ export default { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; +}*/ + +::v-deep(.el-tag) { + flex: 1 1 auto; /* 自动调整宽度 */ + min-width: 30%; /* 设置最小宽度 */ + max-width: 48%; /* 设置最大宽度,留出边距 */ + box-sizing: border-box; + margin-right: 8px; + margin-bottom: 4px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + justify-content: center; + text-align: center; } ::v-deep(.el-select__input) {