Merge branch 'master-20251023-tag' into test1024

# Conflicts:
#	src/components/Course/courseTag.vue
#	src/views/portal/course/Index.vue
This commit is contained in:
670788339
2025-11-04 18:45:49 +08:00
2 changed files with 25 additions and 30 deletions

View File

@@ -2,21 +2,21 @@
<template>
<div class="tag-container">
<el-select style="width: 100%;"
v-model="selectedTags"
multiple
filterable
value-key="id"
remote
reserve-keyword
:remote-method="debouncedSearch"
:loading="loading"
:placeholder="'回车创建新标签'"
@remove-tag="handleTagRemove"
@change="handleSelectionChange"
@keyup.enter.native="handleEnterKey"
@keyup.delete.native="handleDeleteKey"
@focus="handleFocus"
ref="tagSelect"
v-model="selectedTags"
multiple
filterable
value-key="id"
remote
reserve-keyword
:remote-method="debouncedSearch"
:loading="loading"
:placeholder="'回车创建新标签'"
@remove-tag="handleTagRemove"
@change="handleSelectionChange"
@keyup.enter.native="handleEnterKey"
@keyup.delete.native="handleDeleteKey"
@focus="handleFocus"
ref="tagSelect"
>
<el-option
v-for="item in searchResults"
@@ -346,6 +346,8 @@ export default {
box-sizing: border-box; /* 确保padding包含在height内 */
}
::v-deep(.el-select__tags) {
display: flex;
flex-wrap: wrap;

View File

@@ -398,8 +398,7 @@
:key="tagIndex"
size="mini"
type="info" style="margin: 2px 2px; border-radius: 2px;"
:style="{ color: isTagMatched(tag) ? '#387DF7' : '#333333' }"
class="course-tag-item"
:style="{ fontWeight: isTagMatched(tag) ? 'bold' : 'normal' }"
>
{{ tag }}
</el-tag>
@@ -850,9 +849,6 @@ export default {
methods: {
isTagMatched(tag) {
console.info('isTagMatched tag = ' + tag)
console.log('this.stagList = ' + this.stagList.map(item => item.tagName));
console.info(this.stagList.some(searchTag => searchTag.tagName === tag || searchTag.name === tag))
// 检查stagList中是否有匹配的标签
return this.stagList.some(searchTag =>
searchTag.tagName === tag || searchTag.name === tag
@@ -1169,7 +1165,6 @@ handleClearTags() {
// }
//this.handleChangeTypes(item);
this.course.tags ='';
this.searchData();
},
// 无用
@@ -1754,15 +1749,6 @@ handleClearTags() {
</script>
<style scoped lang="scss">
.course-tag-item {
color: #333333; // 默认深灰色
}
.course-tag-item[style*="color: #387DF7"] {
color: #387DF7 !important; // 匹配时的蓝色
}
.couser-list-content {
min-height: 110%;
}
@@ -2712,6 +2698,13 @@ a.custom2 {
// color: white !important;
//}
.course-tag-item {
color: #333333; // 默认深灰色
}
.course-tag-item[style*="color: #387DF7"] {
color: #387DF7 !important; // 匹配时的蓝色
}
/* 添加热点标签容器样式,支持换行 */
.hot-tags-wrapper {
display: flex;